in reply to Variable Scope
#!/usr/bin/perl -w use strict; $::var = 0; print "Variable is [$::var]\n"; changeVar(); print "Variable is now [$::var]\n"; sub changeVar { $::var = 2; }
|
---|
Replies are listed 'Best First'. | |
---|---|
NEVER do this. Ever. Not even once.
by dragonchild (Archbishop) on Jul 30, 2001 at 18:24 UTC | |
by bikeNomad (Priest) on Jul 30, 2001 at 20:59 UTC | |
by dragonchild (Archbishop) on Jul 31, 2001 at 16:29 UTC | |
by perchance (Monk) on Jul 30, 2001 at 18:45 UTC | |
by chromatic (Archbishop) on Jul 31, 2001 at 04:02 UTC |