Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

davorg (18)

Yahoo! ID: daveorguk (Add User, Send Message)

Hacker, author, trainer

Technorati Profile []

Journal of davorg (18)

Wednesday November 30, 2005
06:52 AM

Interesting Perl Typo

[ #27800 ]

Took me a while to work out what this interesting Perl typo was doing.

$ perl -le 'print rand[10]'
$ perl -le 'print rand[10]'

Obviously what was intended was rand(10).

Can you work out what's going on before reading the discussion on Perlmonks?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.