I am having a problem where my perl script will fail upon having an input piped, but works fine when I just list all the file names individually.

For reference, input of the perl script is read with while(<>).

Example:

```
script.pl file1.tag file2.tag file3.tag

```

runs fine.

But the following all fail.

```
find ./*.tag | chomp | script.pl
ls -l *.tag | perl -pe 's/\n/ /g' | script.pl
find ./*.tag | perl -pe 's/\n/ /g' | script.pl

```

I also tested dumping it into a text file and catting that into the perl:

```
cat files.text | script.pl

```

All of them fail the same way. It is like the script is passed no input arguments and the program just finishes.