in reply to use vars - how to use this

You found an example, but you didn't copy/paste

The docs for vars also has example

Did you notice the difference? qw are quotes

use vars qw/ $foo $bar /; is the same as use vars '$foo', '$bar';

see perlop#Quote and Quote like Operators

  • Comment on Re: use vars - how to use this (copy paste)

Replies are listed 'Best First'.
Re^2: use vars - how to use this (copy paste)
by JockoHelios (Scribe) on Jun 07, 2013 at 01:03 UTC
    SheBang !!! That was the problem. My variables weren't in single quotes, or declared with qw. I did notice the qw in the example from the other node, but didn't understand that I needed to qoute my variables if I declare them the other way.

    I was correct on something, though. I would have spent hours trying to ferret out my error. Thanks for your help !

    Dyslexics Untie !!!
Re^2: use vars - how to use this (copy paste)
by Anonymous Monk on Jun 07, 2013 at 00:35 UTC