in reply to odd =>behavior
Useless use of private variable in void context at...I get the warning when I run this code (v5.8.0 built for x86_64-linux-thread-multi):
The "=>" operator is described in perlop as:#!/usr/bin/env perl use warnings; use strict; my $count = 9; my $i = 0; while ($i<5) { next unless $count => 8; $i++; } print "end\n";
The => operator is a synonym for the comma, but forces any word (consisting entirely of word characters) to its left to be interpreted as a string (as of 5.001). This includes words that might otherwise be considered a constant or function call.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: odd =>behavior
by tcf03 (Deacon) on Dec 04, 2007 at 17:38 UTC |