I have a file "test2" with the format of:
[Kent]
Address: 3473278 jones
omaha, ne 65465
Phone: Home 8943, Work 83485, Cell 84853
Email: Home @jdddd.cor, Work
Birthdate: 88484
[Pat]
Address: 747474 street
where, CA 848484
Phone: Home 555-5555, Work 333-3333, Cell 222-22222
Email: Home [EMAIL PROTECTED], Work
Birthdate: 8-4-4
I'm trying to delete in place a paragraph, if a name match is found.
The following code does not work but I think it should:) What am I
doing wrong?
#!/usr/bin/perl
use strict;
use warnings;
open FILE, '+<test2' || die $!;
chomp (my $name = <@ARGV>);
$^I;
$/ = "";
while (<FILE>) {
if (/^\[$name/i) {
s/.//g;
}
}
Thanks,
kent
--
To know the truth is to distort the Universe.
Alfred N. Whitehead (adaptation)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]