when i run my code it's occurred an error
my code...
pls any help..........
my code...
Code:
sub starting {
$out1=`perl macswitch.pl`;
foreach ($out1){
chomp;
$tx->insert('end', "$_\n" );
}
open (FILE, ">mac.txt")|| die "$!";
print FILE "$out1";
close FILE;
open (A, "<mac.txt") || die "$!";
open (B, "<macs.txt") || die "$!";
local $/;
my @res =();
my @res1 =();
my @res2 =();
my @a = split /\n/, <A>;
my @b = split /\n/, <B>;
my %a = map { $_ => 1 } @a; # Make hash of B
@res1 = grep { !defined $a{$_} } @b; # Everything in B not in A
$tx2->insert('end', @res1 );
my %b = map { $_ => 1 } @b; # Make hash of B
@res2 = grep { !defined $b{$_} } @a; # Everything in A not in B
$tx3->insert('end', @res2 );
close A;
close B;
}
Error is.......
Tk::Error: wrong # args: should be ".frame1.text1 insert index chars ?tagList chars tagList ...?" at C:/Perl/lib/Tk.pm line 252, <C> chunk 1.
Tk callback for .frame1.text1
Tk callback for .frame.button2
Tk::__ANON__ at C:/Perl/lib/Tk.pm line 252
Tk::Button::butUp at C:/Perl/lib/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)
Comment