I hope to teach myself Perl, using "Learning Perl" by Randal L. Schwartz, et al. I have no background writing scripts, so this is all pretty much new to me.
Within the early part of the book, I ran across a script meant to help with the understanding of the defined function:
Code: Select all
#!/usr/bin/perl
$madonna = <STDIN>;
if ( defined($madonna) ) {
print "The input was $madonna";
} else {
print "No input available!\n";
}
Code: Select all
cgmd ~/bin $ defined
The input was
cgmd ~/bin $ What am I missing here??
Thanks!


