in reply to Input from Standard Input

Where is the input stored? In @_ I do not think so.

It is stored on the stack, in other words, there is no variable like @_, which you can use

You can however make one

my @stuff = <STDIN>; my $thismany = @stuff; print "I saw this many ", scalar(@stuff), "\n"; print "I saw this many ", int(@stuff), "\n"; print "I saw this many ", 0+@stuff, "\n"; print "I saw this many $thismany\n"; foreach(@stuff){ print "I saw $_"; }

Replies are listed 'Best First'.
Re^2: Input from Standard Input
by kevind0718 (Scribe) on Feb 13, 2012 at 01:52 UTC
    yep that all makes sence. thanks KD