programming-examples/perl/Statement/Conditional Modifiers and print.pl
2019-11-15 12:59:38 +01:00

2 lines
79 B
Perl

$_ = "xabcy\n";
print if /abc/; # Could be written: print $_ if $_ =~ /abc/;