Note that in PERL you can either write: if ($str eq "UNI") { print "Go UNI Panthers!"; } or write print "Go UNI Panthers!" if ($str eq "UNI");
@uniqueFilms = sort keys %films;
print "No movie name in record $n, check it!\n" if ($movieName eq ""); next if ($movieName eq ""); if ( $films{$movieName} ) { $films{ $movieName }++; } else { $films{ $movieName } = 1; }
for ($i = 0; $i < @a; $i++) foreach (@a) { { print "\n $_"; print "\n $a[$i]; } } $temp = $x; ($x, $y) = ($y, $x); $x = $y; $y = $temp; $temp = $a[2]; @a[2, 3] = @a[3, 3]; $a[2] = $a[3]; $a[3] = $temp;