[Chicago-talk] ok im feeling a bit (lot) retarted

Pete Krawczyk mongers at bsod.net
Wed Apr 21 14:20:21 CDT 2004

Subject: [Chicago-talk] ok im feeling a bit (lot) retarted
From: "Dooley, Michael" <Dooley.Michael at con-way.com>
Date: Wed, 21 Apr 2004 12:05:46 -0700

}while (<HANDLE>) {
}        if ($. == 2) {
}                s/$_/Address_V2/;
}                print "$_";
}        }
}Address_V1||FromAddr||||315 Benjamin Lane||||Boise||ID||USA||83704
}Address_V2||FromAddr||||315 Benjamin Lane||||Boise||ID||USA||83704

Can I ask the obvious first question of why you didn't just do:
		print "Address_V2";

But that's OK.  Jim's on the money; the pipes are doing what you don't 
expect - becoming regex metacharaters.  Which is why you never trust user 
input in variables directly contributing to regexes.  Use \Q\E to 
eliminate metachars from having meaning in your input.

-Pete K

More information about the Chicago-talk mailing list