troll314 has asked for the wisdom of the Perl Monks concerning the following question:
Anyway it all works fin except that its handling the string $bob very strangely.
print "$bob 123\n";
This is just a diagnostic line (as is the one before it). However it writes 123 over the contents of $bob. eg if $bob contained "Hello World", it would display "123lo World".
WTF.
Any help would be really appreciated.
#!/usr/bin/perl -w #use strict; #while (</var/spool/imap/user/matt/VVSettlements/*.>) { while (</tmp/42.>) { open(F, "cat $_ | pgp +batchmode +force +verbose=0 -f -z \"not + much\" 2>/dev/null |"); while (<F>){ if (/(BATCH .*)( 199. | 200. )/) { $year = $2; # print "\n\nSTART".$year."END\n\n"; } if (/SALE .*/) { unshift @a, $&; } } $bob = shift @a; print "$bob 123\n"; print $bob.$year while (defined($bob = shift @a)); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: String handling frustrations
by japhy (Canon) on Jul 31, 2001 at 00:33 UTC | |
by troll314 (Initiate) on Jul 31, 2001 at 00:45 UTC | |
|
Re: String handling frustrations
by ginseng (Pilgrim) on Jul 31, 2001 at 01:01 UTC | |
by cLive ;-) (Prior) on Jul 31, 2001 at 01:36 UTC | |
by ChemBoy (Priest) on Jul 31, 2001 at 03:06 UTC | |
by troll314 (Initiate) on Jul 31, 2001 at 01:25 UTC | |
by ginseng (Pilgrim) on Jul 31, 2001 at 01:36 UTC |