Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: weird perl verion and/or OS problem with newlines

by asarih (Hermit)
on Sep 24, 2003 at 20:51 UTC ( [id://294012]=note: print w/replies, xml ) Need Help??

in reply to weird perl verion and/or OS problem with newlines

How big are these attachments? It looks like you're putting the entire content of <STDIN> to $str, and this might be causing the seg faults. I think the following (untested) code does what the code does, without consuming too much memory. Comments welcome.
while (<>) { my $val=''; if (/^\#:lav/) { $_.=<>; $val.="$_\n"; while (/^#:eof/m) { $val.="$_\n"; $_.=<>; } } print $val; }
Update: fixed the bonehead error of using next inside the loops.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-05-19 23:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found