home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
-
- $price = '$100';
-
- print <<EOF; # Same as earlier example.
- The price is $Price.
- EOF
-
- print <<"EOF"; # The same with explicit quotes
- The price is $Price.
- EOF
-
- print <<'EOF'; # A single-quoted quote.
- All things (e.g. a camel's journey through
- A needle's eye) are possible, it's true.
- But picture how the camel feels, squeezed out
- In one long bloody thread, from tail to snout.
- -- C.S. Lewis
- EOF
-
- print << x 10; # Print next line 10 times;
- The camels are coming! Hurrah! Hurrah!
-
- print <<`EOC`; # Execute commands!
- echo 'Your .vacation.msg file says:'
- cat .vacation.msg
- EOC
-
- print <<foo, <<bar; # You can stack them.
- He said bactrian.
- foo
- She said dromedary.
- bar
-