Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: File Open Error

by cdarke (Prior)
on May 09, 2012 at 13:49 UTC ( #969627=note: print w/replies, xml ) Need Help??

in reply to File Open Error

Did you notice there were a few syntax errors?
You probably meant something like this:
foreach my $file (glob('*.txt')) { open(my $fh, $file) or die("Unable to open '$file': $!"); while (my $line = <$fh>) { if ($line =~ m/(Apple|Orange|Litchi)/) { $Sheet->Cells($row,$col-1)->{'Value'} = $file; $Sheet->Cells($row,$col+6)->{'Value'} = $line ; $row=$row+1; } } # close file close($fh); }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://969627]
[LanX]: Obelix might offer to find it again ...
[LanX]: not much to translate anyway since Goscinny died
[Eily]: https://en. wiki/List_of_Aster ix_characters some of the names were changed to include a new pun
[LanX]: sure some are even funnier now
[LanX]: some lost because they were not translated like Epidemais
[LanX]: some of the english names are funny too

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-05-24 15:05 GMT
Find Nodes?
    Voting Booth?