Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

quotes in Perl

by apotheon (Deacon)
on Oct 20, 2004 at 22:33 UTC ( #401006=perltutorial: print w/replies, xml ) Need Help??

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
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perltutorial [id://401006]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-09-21 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (241 votes). Check out past polls.

    Notices?