in reply to I could not use more than one IF ($_ = / /) condition for a single line
$_ = /^(IPR\d+).*/
That doesn't do what you think it does.
To match against a variable, you use the binding operator (=~) not the assignment operator.
But, of course, you don't need to explicitly bind to $_ as that's the default operand for the match operator. So you can rewrite that as just:
/^(IPR\d+).*/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: I could not use more than one IF ($_ = / /) condition for a single line
by jawsai1224 (Initiate) on Jul 01, 2009 at 16:37 UTC | |
by spx2 (Deacon) on Jul 01, 2009 at 17:09 UTC | |
|
Re^2: I could not use more than one IF ($_ = / /) condition for a single line
by jawsai1224 (Initiate) on Jul 01, 2009 at 16:32 UTC |