catfish1116 has asked for the wisdom of the Perl Monks concerning the following question:
Trying to create a program that is based off of an example in 'Learning Perl', (page 275). I would be taking multiple lines from a file and selecting certain fields, splitting on the ':'. I'm sort of stuck here, any input would be greatly appreciated. Below is the beginning of my code. TIA The Catfish
my $line = <>; while (defined($line = <>)) { chomp($line); my @items = split /:/ $line; # print "Customer Data: $line\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using Split function
by haukex (Archbishop) on Nov 27, 2019 at 20:47 UTC | |
Re: Using Split function
by AnomalousMonk (Archbishop) on Nov 27, 2019 at 21:30 UTC | |
Re: Using Split function
by perldigious (Priest) on Nov 27, 2019 at 21:43 UTC | |
Re: Using Split function
by BillKSmith (Monsignor) on Nov 27, 2019 at 21:46 UTC |