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

Dooley, Michael Dooley.Michael at con-way.com
Wed Apr 21 14:54:49 CDT 2004

its a edi file and they need one of the elements changed in the line
until they can apply a permanent fix to the system.

IE I would just be swapping Address_V1 w/ Address_V2 and the rest of the
line would remain the same. so... the intent was

It all seems much clearer now that I actually wrote it down and Jim
brought up the pipe metachar in the source line.

-----Original Message-----
From: chicago-talk-bounces at mail.pm.org
[mailto:chicago-talk-bounces at mail.pm.org] 
Sent: Wednesday, April 21, 2004 2:17 PM
To: Chicago.pm chatter
Subject: Re: [Chicago-talk] ok im feeling a bit (lot) retarted

Yeah, If you want to replace the whole line just do:
$_ = "Address_v2\n";
Are you mixing
$_ =~ s/this/that/;

w/ your:
s/$_/Address_v2/; syntax?

The default string to work on is $_ if you have a s/// cmd by itself.
is like:
$_ = s/\Q$_\E/Address_v2/;
which is easier as:
$_ = "Address_v2";

Again, w/o testing, you may lose your trailing \n in the s/// form.


Andy Bach, Sys. Mangler
Internet: andy_bach at wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5932

Why do programmers confuse Halloween and Christmas?
Because OCT 31 = DEC 25.
Chicago-talk mailing list
Chicago-talk at mail.pm.org

More information about the Chicago-talk mailing list