in reply to Re^2: .. operator and not including the condition of right operand
in thread .. operator and not including the condition of right operand

... if( /^1/ ... /^(0.*)/ ) { $1 and next; print "$_\n"; } ...


  • Comment on Re^3: .. operator and not including the condition of right operand
  • Download Code

Replies are listed 'Best First'.
Re^4: .. operator and not including the condition of right operand
by Roy Johnson (Monsignor) on Apr 27, 2005 at 20:22 UTC
    That will work except when $1 is 0 (which it can be). The three-dot form isn't making a difference in results here, although I suppose it saves some pattern matching. I'd do
    if((/^1/ ... /^0/) =~ /^\d+$/ ){
    although in this case
    if(/^1/ ... (/^0/ && next)){
    works rather neatly.

    Caution: Contents may have been coded under pressure.