WC -Sx- Jones <[EMAIL PROTECTED]>
wrote:

> Jeff Westman wrote:
> 
> > When I ran this 
> > 
> >    $ perl -ne 's/|^NEWLINE^|^/\n/g;print' loadFile
> 
> The program loads the ENTIRE loadfile and then splits characters
> at 
> whitespace "between" characters and then prints every character
> followed 
> by a newline.
> 
> So, how big is loadfile?

28M.

Isn't this pretty inefficient?  Perl die-hards using perl s'///'
over the traditional 'sed', but sed doesn't load the entire file
into memory, hence the name, Steam EDitor.  Sure, once in memory it
runs fast, but it gave me quite unexpected results.

Thanks to all who helped :)


-Jeff

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to