#!/usr/bin/perl -w use strict; my $foo; my $bar; $foo = 7; $bar = 'it is worth $foo'; print $bar; #### #!/usr/bin/perl -w use strict; my $foo; my $bar; $foo = 7; $bar = "it is worth $foo"; print $bar; #### #!/usr/bin/perl -w use strict; my $foo; my $bar; $foo = 7; $bar = "it is \"worth\" $foo"; print $bar; #### #!/usr/bin/perl -w use strict; my $foo; my $bar; $foo = 7; $bar = 'it is \'worth\' $foo'; print $bar; #### #!/usr/bin/perl -w use strict; my $foo; my $bar; $foo = 7; $bar = q(it is 'worth' $foo); print $bar; #### #!/usr/bin/perl -w use strict; my $foo; my $bar; $foo = 7; $bar = qq(it is "worth" $foo); print $bar; #### @baz = ('one', 'two', 'three'); @baz = qw(one two three); #### #!/usr/bin/perl -w use strict; my $foo = 123.45; my $bar = "Martha Stewedprune"; print <<"EOT"; ===== This is an example of text taken literally except that variables are expanded where their variable names appear. foo: $foo bar: $bar EOT #### ===== This is an example of text taken literally except that variables are expanded where their variable names appear. foo: 123.45 bar: Martha Stewedprune