Tuesday, July 12, 2011

Redirecting the input from another file perl

Content of the data:

 root> cat data
while(<STDIN>)
{
print();
}
while(<>)
{
print();
}
root> 

Content of the Perl File:
Perl file:

root> cat kk.pl
while(<>)
{
print();
}

Execution of the perl file:

root> perl kk.pl < data
while(<STDIN>)
{
print();
}
while(<>)
{
print();
}
root>

No comments:

Post a Comment