Anderson, Mark (Service Delivery) wrote:

> Works perfectly for me... ActiveState 5.6.1 on NT4
> 
> #!C:/Activeperl/bin/perl.exe
> use strict;
> use warnings;
> my ($name, $address, $city, $state, $zip);
> format ADDRESSLABEL =
> ===============================
> | @<<<<<<<<<<<<<<<<<<<<<<<<<< |
> $name
> | @<<<<<<<<<<<<<<<<<<<<<<<<<< |
> $address
> | @<<<<<<<<<<<<<<<<, @< @<<<< |
> $city,          $state, $zip
> ===============================
> .
> 
> open(ADDRESSLABEL,">addresses.txt") or die("ack: $!");
> 
> while (<DATA>) {
>    chomp;
>    ($name, $address, $city, $state, $zip) = split(/;/);
>    select (ADDRESSLABEL);

There's no need to select a FH when you specify the FH on the write/print.
I would drop the parens below though just to be clear it's not an expression.

>    write (ADDRESSLABEL);
> }
> 
> __DATA__
> David R. Wagner;4485 Long Green Dr;San Francisco;CA;994058
> 
> 
> F:\>formtest.pl
> F:\>cat addresses.txt
> ===============================
> | David R. Wagner             |
> | 4485 Long Green Dr          |
> | San Francisco    , CA 99405 |
> ===============================


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to