LA.pm: Regex
Douglas Wilson
dgwilson at gtemail.net
Fri Oct 19 20:17:35 CDT 2001
> print join(", ", "foo", ($x->{'Foo'} =~ s/\s+//g) && $x->{'Foo'}, "bar\n");
That will only succeed if there ARE spaces in
the variable. But you're right, its probably better
to just do it in two steps.
Though you could do (ugly though):
print join(", ", "foo", do {(local $_ = $$x{'Foo'};
s/\s+//g; $_ }, "bar\n";
-Doug
--
_______________________________________________
Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free!
http://www.net2phone.com/cgi-bin/link.cgi?143
More information about the Losangeles-pm
mailing list