Re: Understanding Perl better.

2002-02-16 Thread John W. Krahn
Tor Hildrum wrote: > > On 17/2/02 06:01, "John W. Krahn" <[EMAIL PROTECTED]> wrote: > >> > >> open (WRITEFILE, ">$names[2]") || die ("Couldn't open $names[2] > >> for writing\n"); > > > > You should include the $! variable in your error messages. > > I don't really know what $! is. > I tried look

Re: Understanding Perl better.

2002-02-16 Thread John W. Krahn
Tor Hildrum wrote: > > I have 2 questions. > > Here is the code: > #!/usr/bin/perl > use warnings; > use strict; Very good start. > # Merging two files > > print ("Write the two files you wan't to merge and \n"); > print ("lastly the file to merge them too, seperated by a space.\n"); Parent

Understanding Perl better.

2002-02-16 Thread Tor Hildrum
I have 2 questions. Here is the code: #!/usr/bin/perl use warnings; use strict; # Merging two files print ("Write the two files you wan't to merge and \n"); print ("lastly the file to merge them too, seperated by a space.\n"); chop (my $filenames = ); my @names = split(/ /,$filenames); # Get t