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
In reply to split problem by crusty_collins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |