in reply to Re: Re: Re: Re: ascii manipulation in perl
in thread ascii manipulation in perl
Here's the run down:#!/usr/bin/perl -w use strict; my %file; while(<>) { my $type = substr($_,0,3); defined($file{$type)) or open($file{$type}, ">$type.out") or die "Couldn't open $type.out: $!"; print $file{$type}; }
thor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: ascii manipulation in perl
by CountZero (Bishop) on Aug 13, 2003 at 06:00 UTC |