Help for this page
Select Code to Download
Select
or
download this
1. while (<>) { ... } or while (my $line = <>) { ... }?
Select
or
download this
2. -w or use warnings;?
Select
or
download this
3. sub CONSTANT () { ... } or use constant CONSTANT => ...;?
Select
or
download this
4. my ($foo, $bar) = @_; or my $foo = shift; my $bar = shift;?
Select
or
download this
5. for (@array) { ... } or foreach (@array) { ... }?
Select
or
download this
6. print 'foo'; or print('foo');?
Select
or
download this
7. 'simple string'; or "simple string"?
Select
or
download this
8. glob '*' or <*>?
Select
or
download this
9. readline *FOO or <FOO>?
Select
or
download this
10. for (keys %foo) { $_ and $foo{$_} } or while (my ($key, $value) = each %foo) { $key and $value }?