Re: data and script in same location, how to write it down

2008-12-14 Thread John W. Krahn
Chas. Owens wrote: On Sun, Dec 14, 2008 at 11:41, Mr. Shawn H. Corey wrote: snip open my $fh, '<', $file or die "cannot open $file: $!\n"; snip Completely off topic, but I dislike the error messages that say "cannot". "Cannot" implies that the problem exists currently and can cause confusion

Re: data and script in same location, how to write it down

2008-12-14 Thread Chas. Owens
On Sun, Dec 14, 2008 at 11:41, Mr. Shawn H. Corey wrote: snip > open my $fh, '<', $file or die "cannot open $file: $!\n"; snip Completely off topic, but I dislike the error messages that say "cannot". "Cannot" implies that the problem exists currently and can cause confusion when someone goes to

Re: data and script in same location, how to write it down

2008-12-14 Thread Chas. Owens
On Sun, Dec 14, 2008 at 11:36, Anirban Adhikary wrote: > Just write the fiilename as us script and file to open are in same location. > my $filename="datafile.txt "; > open my $FH,'<', $filename || die "no such files $!\n"; snip That needs to be open my $FH, '<', $filename or die "could not open

Re: data and script in same location, how to write it down

2008-12-14 Thread Mr. Shawn H. Corey
On Sun, 2008-12-14 at 22:21 +0800, itshardtogetone wrote: > Hi, > I wish to open a file datafile.txt which is stored in the same location as > the perl script, so how do I write it down? > > open (FILE,'<'," ") || die "no such > files $!\n"; > > use F

Re: data and script in same location, how to write it down

2008-12-14 Thread Anirban Adhikary
Just write the fiilename as us script and file to open are in same location. my $filename="datafile.txt "; open my $FH,'<', $filename || die "no such files $!\n"; Regards Anirban Adhikary. On Sun, Dec 14, 2008 at 7:51 PM, itshardtogetone < itshardtoget...@hotmail.com> wrote: > Hi, > I wish to op

data and script in same location, how to write it down

2008-12-14 Thread itshardtogetone
Hi, I wish to open a file datafile.txt which is stored in the same location as the perl script, so how do I write it down? open (FILE,'<'," ") || die "no such files $!\n"; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comm