On Sat, Feb 18, 2012 at 12:33 AM, Jim Gibson <jimsgib...@gmail.com> wrote: > At 12:10 AM +0800 2/18/12, lina wrote: >> >> >> What's the $_ and $@ > > > They are built-in global variables. $_ is the default variable for many Perl > operations. $@ is the syntax error message from the last eval (why are you > asking about $@; it doesn't appear in your program?).
There in a book "mastering perl" besides me, the first few examples have $@ > > >> I can guess about its usage, but don't get why use _ or @ here?. > > > They are the names of the variables. > > See 'perldoc perlvar' Thanks, > > >> >> BTW, what's the significant advantage perl exceed the other languages >> (it shares lots of similarity with bash and sed), > > > Perl has superb text-handling facilities, automatic memory allocation, > auto-vivication of complex, nested data structures, and easy-to-use > associated arrays (hashes), among its many advantages. > > >> Just curious, >> such as for which problems or under which situation you would consider >> trying perl. > > > I would use Perl for any program not requiring a graphical user interface or > the use of special libraries. Thanks, I am addicted to something else earlier, and now it's a bit clumsy for me to put in daily work. but I like it and a bit regret, haha ... not started learning years ago > > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/