LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-19-2003, 09:28 AM   #1
Jon-
Member
 
Registered: Dec 2001
Distribution: RH5.2/6.2/7.0/7.1/7.2/9/ES21/ES31
Posts: 91

Rep: Reputation: 15
Lightbulb Perl question re arrays/variable names


Hey all,

I'd like to read a text file into an array, which includes variable names which I want to resolve during the load. So far the vars are being stored in the array literally. How could I store them resolved?

For example, the text file might include:

This is a $test variable.

the code might be:

$test="funky_var";
$index=0;
while ($array[$index++] = <FILE_IN>){}
# this doesn't work -- I see 'This is a $test variable'.


Thanks for any help!
Jon
 
Old 09-19-2003, 10:29 AM   #2
keex
Member
 
Registered: Jun 2002
Location: Berlin / Germay
Distribution: gentoo linux, ubuntu
Posts: 40

Rep: Reputation: 17
I have a great idea... subscribe to the perl list....
--> http://lists.perl.org/showlist.cgi?name=perl-beginner
--> http://lists.perl.org/showlist.cgi?name=perl-friends

or find anoter suitable list on http://lists.perl.org/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl: concatenate arrays jrtayloriv Programming 2 01-23-2005 07:13 AM
PERL : Arrays confusing? fredgt Programming 3 12-19-2004 08:24 AM
merging arrays suing perl pantera Programming 1 06-03-2004 08:51 AM
arrays in perl BBQ_Matt Programming 3 09-23-2003 07:45 AM
question about $_ (default variable) in Perl realos Programming 4 07-04-2003 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration