Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Substitution all parts of an array...

by CukiMnstr (Deacon)
on Mar 14, 2003 at 08:21 UTC ( [id://242978]=note: print w/replies, xml ) Need Help??


in reply to Re: Substitution all parts of an array...
in thread Substitution all parts of an array...

while (<IN>) { chomp; $_ =~ s/://g; print OUT $_ ."\n"; }

you can get rid of the chomp; and then you don't need to append "\n" when printing.

in the second option, iterating twice on the data (once for reading the file and then another time for the substitution) can get pretty inefficient if the file is big.

just my 2 cents.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-19 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found