in reply to Re^4: How to pass a variable to a subroutine
in thread How to pass a variable to a subroutine

Five problems unrelated to your question:

Try using

use Data::Dumper; local $Data::Dumper::Useqq = 1; local $Data::Dumper::Terse = 1; print("FOUND_FILE: ", Dumper($FOUND_FILE), "\n"); print("FN_SPLIT: ", Dumper($FN_SPLIT ), "\n");

There's probably leading or trailing spaces.

Replies are listed 'Best First'.
Re^6: How to pass a variable to a subroutine
by learningperl01 (Beadle) on Dec 06, 2008 at 23:13 UTC
    Thanks for the reply/help. After adding the code above and printing the output after the name there is a \r is that a return? How/what is the best way to fix that? Thanks again for all the help.

    08ptr00\r

    -------------RESULTS-------------- FN_SPLIT: 08ptr00/r FOUND_FILE: : 08r3t00

      Looks like you have a DOS file on a unix system. Replacing
      chomp $FN_SPLIT;
      with
      $FN_SPLIT =~ s//\r?\n\z/;
      will handle both DOS and unix files on a unix system.

        Great, thanks for all the help....it's working now!!