I'm trying to read a file and print it, But I always get a junk value printed out in the first line.
Code:Output:#!/usr/local/bin/perl open (MYFILE, '2.pl'); print <MYFILE>; close (MYFILE);
How do i get rid of that first few junk characters? If i write onto another file instead of stdout this doesn't happen..#!/usr/local/bin/perl open (MYFILE, '2.pl'); print <MYFILE>; close (MYFILE);
In reply to Perl prints junk before file by tkly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |