in reply to Re (2): Array for system() call
in thread Array for system() call
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (4): Array for system() call
by dmmiller2k (Chaplain) on Oct 23, 2001 at 23:46 UTC |