Hi,
I'm looking at a script that takes a file on STDIN.
###
#!/usr/bin/perl
my $input = \*STDIN;
print "$input\n";
##
If I run it "script < somefile" the result is
GLOB(0x123ab458)
What can you do with that GLOB?
For inst
Zentara wrote:
>
> Hi,
Hello,
> I'm looking at a script that takes a file on STDIN.
perldoc -q "How can I read in an entire file all at once"
Found in /usr/lib/perl5/5.6.0/pod/perlfaq5.pod
How can I read in an entire file all at once?
> ###
> #!/us
Hi,
You should think of a glob as an alias.
$input = *STDIN;
$file = <$input>;
print $file;
All that does is alias $input to STDIN, and then read the contents of
$input into $file. The main use of this is redirecting your output without
having to write loads of extra code
R
At 13:19 16