Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: File slurping into $text and then accessing a specific line?

by hipowls (Curate)
on Feb 26, 2008 at 22:16 UTC ( [id://670420]=note: print w/replies, xml ) Need Help??


in reply to File slurping into $text and then accessing a specific line?

Depending on how you decide on the particular line. There is

my $line = ( split "\n", $_ )[$wanted_line];
which splits $_ into a list and selects a line by number or
my ($line) = /^(.*?PATTERN.*?)$/ms;
which will pick a line on what PATTERN it conatins.

Log In?
Username:
Password:

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

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

    No recent polls found