Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = 'it is worth $foo';
    print $bar;
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = "it is worth $foo";
    print $bar;
    
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = "it is \"worth\" $foo";
    print $bar;
    
  4. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = 'it is \'worth\' $foo';
    print $bar;
    
  5. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = q(it is 'worth' $foo);
    print $bar;
    
  6. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo;
    ...
    $foo = 7;
    $bar = qq(it is "worth" $foo);
    print $bar;
    
  7. or download this
    @baz = ('one', 'two', 'three');
    
    @baz = qw(one two three);
    
  8. or download this
    #!/usr/bin/perl -w
    use strict;
    my $foo = 123.45;
    ...
       foo: $foo
       bar: $bar
    EOT
    
  9. or download this
    =====
    
    This is an example of
    ...
       variable names appear.
       foo: 123.45
       bar: Martha Stewedprune