Help for this page

Select Code to Download


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