Permalink
Browse files

perl error

git-svn-id: file:///usr/local/svn/util/trunk@18 29942e26-f7dc-dc11-b955-0002b3153201
  • Loading branch information...
1 parent 9f187dc commit a7ec2332ab71f8c802ddfbef6fc04ba8efa21794 leto committed Mar 2, 2008
Showing with 17 additions and 0 deletions.
  1. +17 −0 examples/spurious_perl_error.pl
View
17 examples/spurious_perl_error.pl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+# Why does this produce a warning *and* the expected behavior?
+
+# Useless use of private variable in void context at ./spurious_perl_error.pl line 8.
+# woohoo!
+
+my ($x,$y) = (3,4);
+
+if ( ($x,$y) == pair() ) {
+ print "woohoo!\n";
+}
+sub pair { return (3,4) };
+

0 comments on commit a7ec233

Please sign in to comment.