crusty_collins has asked for the wisdom of the Perl Monks concerning the following question:
Output#!/usr/bin/perl use strict; use warnings; while (<DATA>){ chomp; next if (/Order/); print (" string $_ \n"); $_ =~ s/\"//g; my @array = split /|/ ; print(" order $array[0] \n"); } __DATA__ "129822"|"Custom Currency"|"Living the Dream"|"400" "129823"|"Custom Currency"|"Living the Dream"|"500" "129824"|"Custom Currency"|"Living the Dream"|"600" "129825"|"Custom Currency"|"Living the Dream"|"700" "129826"|"Custom Currency"|"Living the Dream"|"800"
string "129822"|"Custom Currency"|"Living the Dream"|"400" order 1 string "129823"|"Custom Currency"|"Living the Dream"|"500" order 1 string "129824"|"Custom Currency"|"Living the Dream"|"600" order 1 string "129825"|"Custom Currency"|"Living the Dream"|"700" order 1 string "129826"|"Custom Currency"|"Living the Dream"|"800" order 1 string
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: split problem
by toolic (Bishop) on Oct 02, 2014 at 18:03 UTC | |
by crusty_collins (Friar) on Oct 02, 2014 at 18:09 UTC | |
by misterperl (Friar) on Oct 02, 2014 at 18:33 UTC | |
|
Re: split problem
by codiac (Beadle) on Oct 03, 2014 at 10:19 UTC |