Shawn, Yours will print the content of each file... while mine will list only their names.
Emeka On Sun, Jul 31, 2011 at 9:57 PM, Shawn H Corey <[email protected]>wrote: > On 11-07-31 04:52 PM, Emeka wrote: > >> Hello All, >> >> >> I wanted to do this ... >> >> while(<*.pl>){ >> print $_; >> } >> >> >> I got "BEGIN failed--compilation" >> >> Am I using something that is old? >> > > Try: > > { > local @ARGV = glob( '*.pl' ); > while( <> ){ > print $_; > } > } > > See: > perldoc -f glob > perldoc -f local > perldoc perlvar and search for /\@ARGV/ > > > -- > Just my 0.00000002 million dollars worth, > Shawn > > Confusion is the first step of understanding. > > Programming is as much about organization and communication > as it is about coding. > > The secret to great software: Fail early & often. > > Eliminate software piracy: use only FLOSS. > > "Make something worthwhile." -- Dear Hunter > > -- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ > > > -- *Satajanus Nig. Ltd *
