Search results

  1. simX

    perl help?

    I'm going through the OReilly book called "Learning Perl", and they have an introduction section where they introduce some really basic stuff. Here's the entire code for a short prog: #!/usr/bin/perl -w %words = qw( fred camel barney llama betty alpaca wilma alpaca ); print "What is your...
  2. simX

    sendmail not working?

    I've been doing the CGI/perl primers at www.htmlgoodies.com, and it seems that sendmail is not working. The perl script that the author provides (corrected with the correct sendmail path – /usr/sbin/sendmail ) still doesn't seem to send me any mail when it is invoked. I even used sendmail...
  3. simX

    Getting a CGI script to work locally on my Mac

    Hrm. I did what dsnyder said and now I'm just getting a 500 error -- internal server error. Am I missing something? Update: Neeeeevermind. The perl script had an error. :p Q: Where's the perl error log?
  4. simX

    Question about "awk"

    When I print out the array, it's showing the strings "Mn","(H2S)","3H2SO4","(SO)","4". It's saving things from the first regular expression thing, but it's not saving anything from the foreach loop, because it seems you are just printing things to the screen. If it WAS storing them from the...
  5. simX

    Question about "awk"

    It gives me two errors (I'll try to fix it on my own, but I dunno how I'll do): UPDATE: Nevermind, I got it. You forgot a parenthesis on line 9 – you need to close those parentheses. :) By the way, a couple more questions: 1) How do I get this script to accept input, not have a set...
  6. simX

    Escaping carriage returns

    The backslash is the escape character for printable character. But the carriage return is not a printable character. If you go into the Terminal, and you type \ and then a return, it still accepts the return as a real return and tries to execute the command. Somehow, you can get the...
  7. simX

    Question about "awk"

    Haha... funny that you mention perl, because this WAS eventually going to be a CGI script.. I just wanted to understand how to do it first with UNIX, so that I could formulate how to do it in perl. Basically what I'm trying to do is read in a chemical formula (something like...
  8. simX

    Escaping carriage returns

    How do I escape carriage returns in UNIX? I don't remember how to do this.... :(
  9. simX

    Getting a CGI script to work locally on my Mac

    Hrm. I put this at the bottom of the file: <Directory /Users/simmy/Sites/smbxas/cgi-bin> Options +ExecCGI </Directory> And I uncommented the AddHandler script so it looks like this: AddHandler cgi-script .cgi I restarted my Mac (or is there some command I need to do for it...
  10. simX

    Question about "awk"

    How do I get awk to split a string after/before a certain character? For example, if I have the string "9+(8+9+(6+4))", I want awk to split it into "9+", "(8+9+", "(6+4)", ")".... that is, I want awk to split the string BEFORE an open parenthesis, and AFTER a close parenthesis. How would I...
  11. simX

    Getting a CGI script to work locally on my Mac

    Isn't it the command-line utility "perl" that interprets the CGI scripts, though? What does Apache have to do with this – I thought that was just a web server, which I don't need since all the files are locally on my hard drive. :confused:
  12. simX

    Getting a CGI script to work locally on my Mac

    I've been trying to make a perl CGI script for my website, but I don't have any UNIX server to test it on, so I decided I might as well just test in on my iBook since it has perl installed. The problem is that when I set it up (I'm following the www.htmlgoodies.com CGI primers tutorial), it...
  13. simX

    Funny VersionTracker thing the other day...

    Speak for yourself – it works for ME. Ever heard of magnification? Plus, I know where everything is, and since everything is so small, they basically stay in the same place all the time anyway. And now I don't have to search my hard drive to open the application I want – only documents and...
  14. simX

    Did Apple get hacked with this one?

    I checked the attributes on that .dmg yesterday night, and it confirmed what I suspected. The iTunes .dmg has type/creator codes. Normal ones do not. This is why you can have these .dmg files be associated with another application while the iTunes .dmg is still associated with the weird...
  15. simX

    Funny VersionTracker thing the other day...

    Network time was activated, and my clock has always shown the correct time. Plus, that would affect the release date/time for ALL updates, not just one. Sheesh, people. It's supposed to be FUNNY! :rolleyes:
  16. simX

    Post your BAD M$ joke

    This doesn't sound like an M$ joke to me. :rolleyes:
  17. simX

    Funny VersionTracker thing the other day...

    No, it was VersionTracker. SlashDock was doing the same thing, and updates were appearing under that update listed under "Tomorrow" in the screenshot. I think if the developer puts a future release date accidentally, that might cause the problem.
  18. simX

    Did Apple get hacked for this one?

    Probably not. The icon shows up like a normal .dmg file for me. I think that's probably an icon for some other application that is hijacking your .dmg files into thinking they are a file from that application. You can easily change that by going to the info window and changing the application...
  19. simX

    How to redirect URLs?

    I was wondering: Is there any way, via the command line, to permanently redirect certain URLs to other locations/IP addresses? In OS 9, you could accomplish this via a Hosts file, and then tell the TCP/IP preference pane where this file was. I'm not sure how to do this in Mac OS X. Is...
  20. simX

    Did Apple get hacked with this one?

    Probably not. The icon shows up like a normal .dmg file for me. I think that's probably an icon for some other application that is hijacking your .dmg files into thinking they are a file from that application. You can easily change that by going to the info window and changing the application...
Back
Top