On 9月13日, 下午8时33分, shlo...@shlomifish.org (Shlomi Fish) wrote: > Hello William, > > On Mon, 12 Sep 2011 20:05:38 -0700 (PDT) > > William <lilijr...@gmail.com> wrote: > > My Code: > > use strict ; > > use warnings ; > > > chomp($input = <STDIN>) ; > > > I compile this but has a error. say:Globla symbol "@input" requires > > explicit package name at... > > Well, you didn't copy-and-paste the error correctly, but I recognise it. This > is an anachronistic error (and unfortunately very common) that means that you > should declare your variables using "my": > > chomp(my $input = <STDIN>); > > For more information see: > > http://perl.plover.com/FAQs/Namespaces.html > > Regards, > > Shlomi Fish > > -- > ----------------------------------------------------------------- > Shlomi Fish http://www.shlomifish.org/ > Interview with Ben Collins-Sussman -http://shlom.in/sussman > > I may be a geek, but I’m a true Klingon geek‐warrior! And a true Klingon geek > warrior ALWAYS bottom‐posts. > > Please reply to list if it's a mailing list post -http://shlom.in/reply.
thanks, It's pretty inconvenient.,for Almost vary variables is private in code block, these must use my operator. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/