Help for this page

Select Code to Download


  1. or download this
    # this takes the 4th through sixth elements of the array
    # returned by localtime and sets @times to them
    my @times = (localtime)[3..5];
    my $date = sprintf("%4d%02d%02d", $times[2]+1900, $times[1]+1, $times[
    +0]);
    
  2. or download this
    perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); 
    +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth
    +er_name\n"'