Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
We don't bite newbies here... much
 
PerlMonks  

Re: /s option modifier in regex substitution

by 2teez (Chaplain)
on Apr 23, 2012 at 09:33 UTC ( #966559=note: print w/ replies, xml ) Need Help??


in reply to /s option modifier in regex substitution

You could use this:

use warnings; use strict; my $file = shift; # file to process is the 1st command line argument open my $fh, $file or die":$!"; while(<$fh>){chomp; last if/__END__/; print $_,$/; } close $fh;


Comment on Re: /s option modifier in regex substitution
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2013-05-22 23:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (471 votes), past polls