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. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]