- or download this
my $GREP_STR = "123"; ## a global var
print GREP_FH "My line with 123\n"; ## anywhere in the code
print GREP_FH "My line with 456\n";
- or download this
&myprint("My line with 123\n");
&myprint("My line with 456\n");
- or download this
$GREP_STR = '123';
print STDOUT "Header - always print this\n";
print GREP_FH "My line with 123\n"; ## printed at the terminal
print GREP_FH "My line with 456\n"; ## not printed