Re: local and my in subroutines

2009-02-23 Thread John W. Krahn
Karyn Stump wrote: I am trying to learn subroutines. I have seen refernces to using my and local for passing variables so I am playing with them to try to understand better how this all works. http://perl.plover.com/FAQs/Namespaces.html There is also some information in: perldoc perlsub I

Re: local and my in subroutines

2009-02-23 Thread Karyn Stump
At 05:09 PM 2/23/09 -0800, Jim Gibson wrote: >On 2/23/09 Mon Feb 23, 2009 4:30 PM, "Karyn Stump" >scribbled: > >> I am trying to learn subroutines. I have seen refernces to using my and >> local for passing variables so I am playing with them to try to understand >> better how this all works. >

Re: local and my in subroutines

2009-02-23 Thread Gunnar Hjalmarsson
Karyn Stump wrote: I am trying to learn subroutines. I have seen refernces to using my and local for passing variables You seem to be dealing with named variables within subroutines, not passing them. Global symbol "$name" requires explicit package name at ./user-sub.pl line 143. sub

Re: local and my in subroutines

2009-02-23 Thread Karyn Stump
At 04:30 PM 2/23/09 -0800, Karyn Stump wrote: >I am trying to learn subroutines. I have seen refernces to using my and >local for passing variables so I am playing with them to try to understand >better how this all works. > >I have a subroutine in the script below, printsub that errors when it is

Re: local and my in subroutines

2009-02-23 Thread Jim Gibson
On 2/23/09 Mon Feb 23, 2009 4:30 PM, "Karyn Stump" scribbled: > I am trying to learn subroutines. I have seen refernces to using my and > local for passing variables so I am playing with them to try to understand > better how this all works. Neither 'local' nor 'my' is required for passing arg

local and my in subroutines

2009-02-23 Thread Karyn Stump
I am trying to learn subroutines. I have seen refernces to using my and local for passing variables so I am playing with them to try to understand better how this all works. I have a subroutine in the script below, printsub that errors when it is run with Global symbol "$name" requires explicit