Re: Using Perl to parse comma diliminated fields ---

2008-03-20 Thread google
On Mar 18, 5:46 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > [EMAIL PROTECTED] wrote: > > Hey Perl Guru's:) > > I'm hoping that someone can help me out... I have a regular'ol ASCII > > file which I'll need to read only the first line, and parse the three > > numbers that are seperated by commas a

Re: Using Perl to parse comma diliminated fields ---

2008-03-20 Thread google
Thanks for the repsponse guys!!! With your help ( really the direct answer ) I was able to get this going! Below is my final script that works like a charm. The only question for learning purposes is, what does "=~ /[-+]?[\d.]+/ g;" actually do? My Perl Cookbook doesn't explain ( or I just don't k

Using Perl to parse comma diliminated fields ---

2008-03-18 Thread google
Hey Perl Guru's:) I'm hoping that someone can help me out... I have a regular'ol ASCII file which I'll need to read only the first line, and parse the three numbers that are seperated by commas and print the results. This file will always consist of the same lines, but the numbers will be differen

Perl 5.8.6 bug in open()?

2007-10-30 Thread google
# --- my $fname = '/volumes/hd/home/kevin/file_test '; # note file ends with a space character print "Exists: <$fname>\n" if (-e $fname); print "Is a file: <$fname>\n" if (-f $fname); open(FH, $fname) or die "Can't open '$fname': $!"; close(FH) or die "Can't close '$fname': $!"; # --- ---