Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Multiple Rows

by aaron_baugher (Curate)
on Oct 04, 2013 at 04:34 UTC ( [id://1056836]=note: print w/replies, xml ) Need Help??


in reply to Multiple Rows

I get the error message: "Variable length lookbehind not implemented in regex". What is it you want the regex to do? Maybe there's a different way to do it.

Also, you should "use strict; use warnings;" and indentation is good for the soul. And here's a more perlish way to process a file line-by line without loading it all into memory first, using the safer three-argument open with error-checking:

open my $fh, '<', 'hostdata.txt' or die $!; while( my $hdb2 = <$fh> ){ # do stuff with $hdb2 } close $fh;

Aaron B.
Available for small or large Perl jobs; see my home node.

Log In?
Username:
Password:

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

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

    No recent polls found