programming-examples/perl/Statement/Conditional Modifiers and print.pl

2 lines
79 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$_ = "xabcy\n";
print if /abc/; # Could be written: print $_ if $_ =~ /abc/;