[Omaha.pm] FWD: FIXME, July 2001

Daniel Linder dan at linder.org
Tue Dec 5 18:25:01 PST 2006


On Dec 5, 2006, at 2:35 PM, Daniel Linder wrote:
> So, it appears that the "$/" variable does keep the \n characters and
> doesn't treat them as special anymore.

On Tue, December 5, 2006 19:32, Jay Hannah wrote:
> Well, I live in a Linux/AIX universe so for me $/ is "\n" by default.
> If I change it to "||||" then "\n" is not special anymore.  :)

Since a lot of people use "chop" to remove the trailing \n, for those of
you who are forced to use $/ as "||||" could use this, right:
$variable =~ s#$/##;

That should perform a search/replace of the "||||" with "".  Not as simple
as "chop" but the code would be re-usable if the delimiter changed in
value and/or length.

Dan

- - - -
"Wait for that wisest of all counselors, time." -- Pericles
"I do not fear computers, I fear the lack of them." -- Isaac Asimov
"Soon we will be able to harness the rotational energy from Orwell's grave
to solve all world energy problems." -- /. user GigsVT (208848)
GPG fingerprint:6FFD DB94 7B96 0FD8 EADF  2EE0 B2B0 CC47 4FDE 9B68



More information about the Omaha-pm mailing list