Gunnar Hjalmarsson wrote:
Brian Volk wrote:

while (<KCITEM>) {

You want to remove the newline character:

    chomp;

  print "$main_url\n";
  s/1804/KCITEM/ and print "$main_url\n";

You probably mean:

$main_url =~ s/1804/$_/ and print "$main_url\n";

Hmm.. That suggestion wasn't very clever, I think. $main_url needs to be unchanged, and the substitution needs to take place twice per number. Try this instead:


    print "$main_url\n";
    while (<KCITEM>) {
        chomp;
        my $new_url;
        ( $new_url = $main_url ) =~ s/1804/$_/g and print "$new_url\n";
    }

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to