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

Re^4: Parsing multiple lines based on a given String

by ArifS (Beadle)
on Jun 27, 2016 at 15:23 UTC ( [id://1166667]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Parsing multiple lines based on a given String
in thread Parsing multiple lines based on a given String

I tried to replace the following line-
open my $fh, '<', \$file or die "unable to open read file $!";
with -
my $filename = 'file.txt'; open(my $fh, '<:encoding(UTF-8)', $filename) or die "Could not open file '$filename' $!";
and it doesn't give an output or any error. Any clue? --------------------------------------------------------------- oh, never mind... had to use chomp. chomp($line);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1166667]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found