in reply to Global vars

Why do you want another way?

For most situations lexical variables declared with my are exactly what you want.

There are also "global" variables that are declared with our or (subtly diffent iirc) with use vars ($variables).

You could also say no strict 'vars';, but that's a really bad idea unless you know what you're doing.

Replies are listed 'Best First'.
Re^2: Global vars
by Alexseki (Initiate) on Mar 17, 2008 at 14:33 UTC
    Now I learned my ($a,$b,$c,$d) It was the problem Many "my" words in my code But thanks

      Alexseki as an aside, you might want to give the perlsyn documentation module a look, specifically search for 'Declarations', so you don't run into trouble with lexical variable scoping issues.

      Pancho