On 11-07-31 06:44 PM, Emeka wrote:
Yours will print the content of each file... while mine will list only their
names.
Yes, sometimes people want the contents printed but end up printing the
list. I wasn't sure what you wanted and since your version looked good
for printing the list, I show
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 wrote:
> On 11-07-31 04:52 PM, Emeka wrote:
>
>> Hello All,
>>
>>
>> I wanted to do this ...
>>
>> while(<*.pl>){
>> print $_;
>> }
>>
>>
>> I got "BEG
Thanks Rob ... It worked. Shawn thanks so much.
I found out that the problem was from my little box Nanonote... It has a
light weight Perl. When I switched to real thing it worked.
Emeka
On Sun, Jul 31, 2011 at 11:02 PM, Rob Dixon wrote:
> On 31/07/2011 21:52, Emeka wrote:
>
>> Hello All,
>>
>
On 31/07/2011 21:52, Emeka wrote:
Hello All,
I wanted to do this ...
while(<*.pl>){
print $_;
}
I got "BEGIN failed--compilation"
Am I using something that is old?
There is nothing wrong with that. Please show your complete program -
there must be something else in the file that is causing
If you want that in a script, use File::Find and open each file and pass the
file handle.
On Jul 31, 2011 4:53 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?
>
>
> Emeka
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 pe
Hello All,
I wanted to do this ...
while(<*.pl>){
print $_;
}
I got "BEGIN failed--compilation"
Am I using something that is old?
Emeka
--
*Satajanus Nig. Ltd
*