>>>>> "PN" == Perl Noob <[email protected]> writes:

  >> On Jan 19, 12:01 pm, [email protected] (C.DeRykus) wrote:
  >>> On Jan 18, 9:09 pm, [email protected] (Perl Noob)
  >>> wrote:
  >>> > ...
  >>> 
  >>>  perl -ne '$_ .= <>;s/\n//;print' infile > outfile
  >>> 
  >> 
  >> Even easier:  perl -pe '$_ .= <>; s/\n//' infile > outfile
  >> 
  >> --
  >> Charles DeRykus


  PN> MAGIC!!!  That is EXACTLY what I needed.  The <> was the miracle I was
  PN> looking for.

the next question is do you understand what that code is doing? and what
the <> operator does? and the -p option? don't just use that code
without understanding it or you won't learn more perl. this list is
about learning perl, not just getting working perl code to use.

uri

-- 
Uri Guttman  ------  [email protected]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to