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

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

Replies are listed 'Best First'.
Re^7: How to pass a variable to a subroutine
by ikegami (Patriarch) on Dec 07, 2008 at 00:28 UTC

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