use strict; if ($line =~ /TC/g) { my $lookfor = "TC"; } else { my $lookfor = "26 "; } print $lookfor;
janitored by ybiC: Balanced <code> tags around codeblock, wee tiny format cleanups, strike extraneous leading "use strict; " from title
In reply to Use variable outside if statement by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |