Nishi Bhonsle wrote:
[big snip]
>
open FILE,"+<$logfile";
@contents = <FILE>;
foreach $src (@contents)
{
if(<for some bla condition1)
{
my $record = qq("<SH>/$src" "%HOME%/$src" "$src"\n);
print FILE2 $record; }
elsif(<for some bla condition 2){ ..... }
}
close FILE2;
close FILE;
So, instead of printing "<SH>/$src" "%HOME%/$src" "$src" in one single
line,
it prints each field of the record ie "<SH>/$src", "%HOME%/$src" and "$src"
on a separate line.
Hi
chomp (@contents = <FILE>);
will fix it.
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>