On 09/23/2006 07:07 PM, Rob Dixon wrote:
[...]
If you want to do what you said, and put everything up to the pipe into a
variable (scalar $tex?) then
/([^|]+)/;
$tex = $1;
[...]
No, you should always only use the match variables after you've
determined that the match was successful:
/^([^|]+)/ && $tex = $1;
or this:
$tex = $1 if /^([^|]+)/;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>