[wellylug] Need some help with Perl
Lloyd
lloyd at fusion.net.nz
Wed Oct 31 13:29:36 NZDT 2001
Hey
On Tue, 30 Oct 2001, Jamie Dobbs wrote:
> #now process each line of the input array and add it to the newlines
> array for sending
> foreach $line (@lines) #visit each line in turn and call it $line
> {
> $lines =~ s/\n//g;
> $lines =~ s/\r//g;
> $lines =~ s/cM//g;
You seem to be striping \r\n from the wrong variable? Should be
$line, not $lines? :)
Also, it's probably a good idea to do a change your loop to
while (<INFO>) {
$line = $_;
}
This way you don't load the entire file into memory at the start.
cya
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get your FREE VeriSign guide to security solutions for your web site: encrypting transactions, securing intranets, and more!
http://us.click.yahoo.com/UnN2wB/m5_CAA/yigFAA/0XFolB/TM
---------------------------------------------------------------------~->
.-. Wellington
/V\ Linux
// \\ Users
/( )\ Group
^^-^^
http://wlug.paradise.net.nz/
To unsubscribe from this group, send an email to:
wellylug-unsubscribe at egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the wellylug
mailing list