Thanx
  I am not a great master of perl , but have been getting my job done
with perl for the past 2 years. Can u educate me why I cant do 'symbolic
references' in eval('@' .$1 .' = () ')


On Wed, 2002-08-28 at 03:31, Jeff 'japhy' Pinyan wrote:
> On Aug 27, Ramprasad A Padmanabhan said:
> 
> >> if ($line=~(/^\[\[(\w+)\]\]/)){
> >> @$1=();   #this is the line I want to acheive my aim with!
> >> }
> >
> >  if ($line=~(/^\[\[(\w+)\]\]/)){
> >  eval('@' .$1 .' = () ') || warn $@
> >  }
> 
> First, don't do that.  You're doing symbolic references in effect.
> Second, that eval() returns 0 (the size of the array), and thus you will
> get warned for no reason.
> 
> -- 
> Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
> RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
> ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
> <stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
> [  I'm looking for programming work.  If you like my work, let me know.  ]
> 
-- 
Ramprasad A Padmanabhan
Sr Software Engineer
Netcore Solns Pvt Ltd
Mumbai
ph - (022) 4628000


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to