Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: filehandle regex

by CountZero (Bishop)
on Nov 17, 2010 at 07:18 UTC ( #871943=note: print w/ replies, xml ) Need Help??


in reply to filehandle regex

If you are sure the data you want is always on the first line of each block, you could try this:

use Modern::Perl; { local $/ = ''; say +(split /\n/)[0] while <DATA>; } __DATA__ ram: 702 Func: Func_file_permission testing tam: 768 Func: Func_file_permission test cham: 803 Func: Func_file_permission test

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James


Comment on Re: filehandle regex
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-08-01 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (6 votes), past polls