On Apr 3, Mandar Rahurkar said:

>I want files labeled band_1_train_but_1_neutral.txt
>from 7 to 16

>@loop=(7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
>foreach $no (@loop)
>  {
>    $file_list=$list."/band_$no_train_but_1_neutral.txt";

Perl is seeing the variable $no_train_but_1_neutral, instead of just $no.

To get around that, do:

  $file_list = "$list/band_${no}_train_but_1_neutral.txt";

-- 
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]

Reply via email to