Brian Volk wrote:
> Hi All~

Hello,

> I'm trying to get my head around local $/ = ''; #enable paragraph mode. 

Did you read the documentation for it in perlvar.pod?

perldoc perlvar

Is there anything in the documentation that you don't understand?


> If I have a tab delimited file that looks like this: 
> 
> 1311001
> Aed Motorsports
> 5373 W 86th St
> Indianapolis, Indiana 46268 U.S.A.
> 
> 7069210
> Bird Electronic
> 30303 Aurora Rd
> Solon, Ohio 44139 U.S.A.
> 
> 1020700
> Charis Disk Golf
> Ste 160-135
> 4000 W 106th St
> Carmel, Indiana 46032 U.S.A.
> 
> and code that looks like this:
> 
>     local $/ = '';
>     while (<OLD>) {
> 
>     my @rows = split /\n/;
> 
>     print SAVESTDOUT join("\t", @rows), "\n";

You don't have to split() and join() the data, this would be more efficient:

      chomp;
      tr/\n/\t/;
      print SAVESTDOUT "$_\n";


>     }


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to