hi ALL, I am new to perl and I need some help from you guys,
I have text file which looks like following(its about 100 lines) OUTPUTDIR=C:\Project\Module\outputdir INPUTDIR=C:\Project\Module\Inputdir Now I have to use each and every line of the text file in my perlscript as command line arguments. some thing like this perl -s perlscript1 $OUTPUTDIR $INPUTDIR (the values of INPUTDIR andOUTPUT should be same as in text file) How can i do that ? My thought is to set each and every line of the textfile as environment variable. and i have written the following script #!/usr/bin/perl -w my $FILE="C:\\Documents and Settings\\Desktop\\perlscrip\\samp.txt"; open(OF,$FILE) or die("Could not file."); while($line = <OF>) { system("SET $line"); } close(OF); print "$ENV{va}"; the above script does not show any errors and does not set va as environment variable. what would be the problem in the above script? Is there any other way of using the values in text file as varibales in perl script. Waiting for you solutions.. Thanks Perlstarter.