From: "John W. Krahn" <[email protected]> > Jenda Krynicky wrote: > > From: "raphael()" <[email protected]> > >> It is actually very enlightening to read all the post > >> on this list. Most of the stuff actually goes over my head as > >> I have no need/knowledge of CGI or dbase. Just some text processing. > >> > >> I am new to Programming/Perl (chapter 5 "Learning Perl"). > >> I also read a little about 'system() & exec(). > >> > >> This is my first actual 'useful' Perl script!! > >> I had written this as a Bash script then converted it to Perl. > >> > >> --code-- > >> > >> #!/usr/bin/perl > >> > >> use 5.010; > > > > apart from the (pretty useles say()) there is nothing 5.10 specific > > in the code. I do think say() is not something I would want to make > > my scripts incompatible with older perls for. > > > >> use strict; > >> use warnings; > >> > >> my ($A, @B, @C, $D); > > > > Do use meaningful variable names! And declare them together with the > > definition, not upfront. > > > >> $A = 'http://abc.com/texts/files/getthisfile_'; > >> > >> # For files that are numbered by 01.txt > >> # Also can append a '0' to $A & still use @C > >> @B = qw { 01 02 03 04 05 06 07 08 09 10 }; > > > > Have a look at spritf(). > > $ perldoc -f spritf > No documentation for perl function `spritf' found > > ;-(
Silly typos. perldoc -f sprintf Jenda ===== [email protected] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
