in reply to How to read in data with pipe characters

/try.pl a|b|c|d

It is unusual to run a script from the root directory, you probably mean:
./try.pl 'a|b|c|d'
but that is a shell question, it has nothing to do with Perl.