***** Running PERL from the command line for quick experienments ****** syntax: perl -e ' --- Perl statements enclosed in single quotes --- ' chaos:~$ perl -e '$radius=10; $area=3.14 * $radius**2; print "\nArea: $area\n";' Area: 314 chaos:~$ perl -e '$r=<>; $area= 3.14 * $r**2; print "\nArea is $area\n";' 5 Area is 78.5 --------------------------------------------------- print "Please enter the radius of the circle: "; $r = <>; $area = 3.14159 * $r ** 2; print "\nCircle with radius $r has total area" . " $area units."; Please enter the radius of the circle: 100 Circle with radius 100 has total area 31415.9 units. ---------------------------------------------------- chaos:~$ perl -e 'print "\nYour name? "; $a = <>; print "\t\t\t Hello $a \n";' Your name? Mortimur Hello Mortimur chaos:~$ perl -e 'print "\n\UHello World\n\n";' HELLO WORLD chaos:~$ perl -e 'print "\n\LHello World\n\n";' hello world chaos:~$ perl -e 'for ($i=1; $i<=5; $i++) { print "$i Hello World\n"; }' 1 Hello World 2 Hello World 3 Hello World 4 Hello World 5 Hello World chaos:~$ perl -e ' @a=qw(I am the snow balls thrown awfully terribly fearfully inaccurate); foreach $word (@a) { print "$word\n"; } print "\n\n"; ' I am the snow balls thrown awfully terribly fearfully inaccurate