>>>>>> "PN" == Perl Noob <perln...@tragic.pointyhats.com> writes:
>
>   >> On Jan 19, 12:01 pm, dery...@gmail.com (C.DeRykus) wrote:
>   >>> On Jan 18, 9:09 pm, perln...@tragic.pointyhats.com (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

You can tell from my initial request that I have some knowledge.  An
expert? No.  But not an novice either.  I had no real knowledge of the
<> until it was introduced to me on this list.  I did find out what it
did, and incorporated it into my script.  However, I normally don't
run from the command line so the -p -n distinction did not really
matter to me.  But, the paragraph mode tip led me to a whole new area.

All that said, my file is working and I appreciate the push.



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to