in reply to Oddity...losing filename from stdin - very wierd
I think maybe the difference is using the diamond (<>) operator vs. globbing.
If you want to print out the contents of a file use the diamond operator.
% perl -e 'print while (<>);' yourfilenamehere
If you want to print out a list of files, use the glob operator and specify which file names to print. For example, print the names of all the perl files in the dir
% perl -e 'print while (<*.pl>);'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Oddity...losing filename from stdin - very wierd
by snafu (Chaplain) on Apr 09, 2002 at 16:56 UTC |