Trying to understand Perl

From: Patrick (psmith_at_marine.usf.edu)
Date: 11/30/04


Date: Tue, 30 Nov 2004 14:39:49 -0500

Hello good people,

I am trying to understand Perl and why things work. Could someone break
down for me the snippet of code below and tell me exactly how the
operation works. I guess I am mostly confused about the placement/order
of elements of the code and how Perl interprets it. Oh and exactly how
does $_ work. I think if I could get a better understanding of the how
and why it might clear up my confusion. Thanks, Patrick

(grep {$newfile eq $_} @files)

-- 
Patrick A. Smith  Web Administrator
Ocean Circulation Group – USF - College of Marine Science
http://ocg6.marine.usf.edu      Phone: 727 553-3334
The trouble with doing something right the first time is that nobody
appreciates how difficult it was. - La Rochefoucauld


Relevant Pages

  • Re: Trying to understand Perl
    ... > I am trying to understand Perl and why things work. ... > and why it might clear up my confusion. ... Thanks, Patrick ... The grep function can usually be written more expansively as a foreach ...
    (comp.lang.perl.misc)
  • Re: Trying to understand Perl
    ... > down for me the snippet of code below and tell me exactly how the ... I think if I could get a better understanding of the how ... > and why it might clear up my confusion. ... Thanks, Patrick ...
    (comp.lang.perl.misc)
  • Re: subroutine definitions
    ... > Perl prototypes strikes me as primarily a seed of confusion. ... When we have so many beginners tripping themselves up by trying to ...
    (perl.beginners)
  • Re: install perl DBD::mysql problem on linux
    ... RedHat has a "default" installation of perl in some different ... When I did away with it and reinstalled perl in /usr/local/.., ... -- So multiple copies of perl/locations was confusing the process. ... >Patrick Galbraith Senior Software Developer ...
    (perl.dbi.users)
  • Re: Optimized count of files in tree
    ... Patrick> directories) in a complete tree. ... at a file as a separate file or not. ... See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! ...
    (comp.lang.perl.misc)