Any guesses about the output of this simple script? Select area below to find out.#!/usr/bin/perl -wT use strict; my @arr; @arr[0] = localtime(); $arr[1] = localtime(); print "\$arr[0] = $arr[0]\n"; print "\$arr[1] = $arr[1]\n";
5 points for anyone who expected $arr[0] to contain an integer. 20 points for anyone who knew it would contain the seconds value, *not* the number of elements in the list returned by localtime(). (10 points for anyone who coded up an example because they weren't sure... woohoo) |
-Blake
In reply to Re: Re (2): Array for system() call
by blakem
in thread Array for system() call
by proxima
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |