John McKown wrote:
my ($item_num,$a,$b) = $i =~ /(.*?|)((?:.*?|){11})(.*)/;
print LINE $inv|$item_num|$a|$item_num|$b\n;
I think that I have that right. Well, assuming that the original is
correct.
No John,
If you are using $a and $b as variables in any context other than the sort
For Quality purpouses, Lone Wolf 's mail on Thursday 05 February 2004 00:52
may have been monitored or recorded as:
I'm back to dealing with the main issue of a badly formatted file being
brought down from an archaic system and needing to be cleaned up before
being passed to another user or a
On Feb 4, Lone Wolf said:
I'm back to dealing with the main issue of a badly formatted file being
brought down from an archaic system and needing to be cleaned up before
being passed to another user or a database table. I have the code
below, which pulls the whole file in and parse it line by
I tried the my @fields and I did not get it to work, probably because my
coding skills have not improved enough lately to be worthy of perl.
Thank goodness I never said I had perfect code, because I would
definitely be lying.
I attached 2 files, one the beginning data, the other the .sql file
On Wed, 4 Feb 2004, Jeff 'japhy' Pinyan wrote:
snip
foreach $i (@grok) {
chomp($i);
($item_num,$item_desc,$b1,$b2,$b3,$b4,$cc,$vn,$qoh,$qc,$qor,$bc,$sc,$yp)
= split(/\|/,$i);
print FILE
$inv|$item_num|$item_desc|$b1|$b2|$b3|$b4|$cc|$vn|$qoh|$qc|$qor|$bc|$it
em_num|$sc|$yp\n;
On Feb 4, John McKown said:
On Wed, 4 Feb 2004, Jeff 'japhy' Pinyan wrote:
foreach $i (@grok) {
chomp($i);
($item_num,$item_desc,$b1,$b2,$b3,$b4,$cc,$vn,$qoh,$qc,$qor,$bc,$sc,$yp)
= split(/\|/,$i);
print FILE
$inv|$item_num|$item_desc|$b1|$b2|$b3|$b4|$cc|$vn|$qoh|$qc|$qor|$bc|$it
For Quality purpouses, Lone Wolf 's mail on Thursday 05 February 2004 04:23
may have been monitored or recorded as:
Hi
Thank goodness I never said I had perfect code, because I would
definitely be lying.
no worries - I post code to get feedback. Thats the whole ideaof learning it.
I
For Quality purpouses, wolf blaum 's mail on Thursday 05 February 2004 06:07
may have been monitored or recorded as:
The script reads all files in the sql subdir of your home dir and produces
the corrosponding filname.out in your homedir.
shame on me: of course it reads all the files in the