open(FILEHANDLE,"+<filename.txt");
Indeed, that's what he wrote in the first place, so I really cannot grasp the sense of your comment. OTOH the first and most important thing to do is to direct both him and you to andreas1234567's recommendations. But the greatest problem is that in all earnestness one can hardly make a sense of the OP's request too. I suspect that for some reason he's really after printing to FILEHANDLE something read from FILEHANDLE itself:
C:\temp>cat bar.pl #!/usr/bin/perl use strict; use warnings; open my $fh, '+<', $0 or die "D'Oh! $!\n"; print $fh +<$fh>; __END__ C:\temp>bar.pl C:\temp>cat bar.pl #!/usr/bin/perl use strict; use warnings; open my $fh, '+<', $0 or die "D'Oh! $!\n"; print $fh +<$fh>; __END__ #!/usr/bin/perl use strict; use warnings; open my $fh, '+<', $0 or die "D'Oh! $!\n"; print $fh +<$fh>; __END__
In reply to Re^2: file handing
by blazar
in thread file handing
by boby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |