Note that the binding operator =~ imposes a scalar context on its left operand, so matching an array does not do what you think.while (<IFILE>) { if (my ($word, $time_stamp) = /[#!]\s+(\w+)\s+(\d+)./) { print "[ $word $time_stamp ]\n"; } }
In reply to Re: Get variables from if with regex
by choroba
in thread Get variables from if with regex
by Saved
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |