Mega Code Archive

 
Categories / Perl / Statement
 

Mix $_ and foreach statement

#!/usr/bin/perl -w use strict; my @a = qw(hello world good bye); print "[$_]\n" foreach @a;