"John W. Krahn" schreef:
> tr/\t/ /s;
To also squash adjacent space characters:
tr/\t / /s;
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Andrej Kastrin wrote:
John W. Krahn wrote:
This should do what you want:
#!/usr/bin/perl
use warnings;
use strict;
my $FNI = shift;
my $FNO = "$FNI.dat";
open my $OUT, '>', $FNO or die "Cannot open '$FNO' $!";
open my $IN, '<', $FNI or die "Cannot open '$FNI' $!";
my ( $id, $line );
while
Dear Jonh,
many, many thanks for your quick answer.
I modified your script a bit:
$line .= $_ if /Id|To|From/;
print $OUT "$id\t$line\n" if m!/Note!;
to:
$line .= $_ if m!! .. m!!;
print $OUT "$id\t$line\n" if m!!;
but some problem still persists with the output:
001
001Tho
Andrej Kastrin wrote:
Dear all,
Hello,
to pre-process my XML dataset in run simple Perl script on it, which
extract Id identifier from XML data and paste the whole XML record to
it. For example, the input data looks like:
001
Thomas
Joana
002
Dear all,
to pre-process my XML dataset in run simple Perl script on it, which
extract Id identifier from XML data and paste the whole XML record to
it. For example, the input data looks like:
001
Thomas
Joana
002
John
Paula