Try this.
$t->insert("end", &gettime);
--
Shekar
On Fri, Aug 24, 2012 at 11:58 AM, Irfan Sayed wrote:
> i have to call localtime () function to get the latest time everytime when
> i print the lines using insert method
> i mean , i need to print the latest time in scrolled text box
>
> lets s
i have to call localtime () function to get the latest time everytime when i
print the lines using insert method
i mean , i need to print the latest time in scrolled text box
lets say :
use Tk;
$mw = MainWindow->new();
my $t = $mw->Scrolled("Text")->pack (-side => 'left', -expand=>1);
$t->insert
On Aug 23, 2012, at 9:35 PM, Irfan Sayed wrote:
> thanks. this will help to print the contents of array on separate line.
> however, if at all we need to call function then what is the syntax, how we
> can call that ?
What function do you want to call? When do you want to call it? What does the
thanks. this will help to print the contents of array on separate line.
however, if at all we need to call function then what is the syntax, how we can
call that ?
please suggest .
regards
irfan
From: Shawn H Corey
To: beginners@perl.org
Cc: Irfan Sayed
S
On Thu, 23 Aug 2012 14:17:26 -0700
Jim Gibson wrote:
> You could also combine print, grep, and map to accomplish the same
> thing.
Please don't. If you're having this much trouble getting it right, the
person stuck with maintaining it will also have trouble understanding
what you coded. Break it
On Thu, 23 Aug 2012 15:58:43 -0500
Chris Stinemetz wrote:
> print grep { $_->[0] >= 0 } @coords;
You're trying to do too much in one statement.
for my $coord ( @coords ){
if( $coords->[0] >= 0 ){
print join( q{, }, @{ $coords } ), "\n";
}
}
--
Just my 0.0002 million dolla
On Aug 23, 2012, at 1:58 PM, Chris Stinemetz wrote:
>>
>>
>> If @coords is just an Array of Arrays then that should be:
>>
>> print grep { $_->[0] >= 0 } @coords;
>>
>>
>> Your example thinks @coords is an Array of Arrays of Arrays.
>>
>>
>> John
>> --
>>
>
> print grep { $_->[0] >= 0 }
>
>
> If @coords is just an Array of Arrays then that should be:
>
> print grep { $_->[0] >= 0 } @coords;
>
>
> Your example thinks @coords is an Array of Arrays of Arrays.
>
>
> John
> --
>
print grep { $_->[0] >= 0 } @coords;
Just prints the memory adress:
ARRAY(0x29d459c)ARRAY(0x29d462c)ARRAY(
On Aug 23, 2012, at 12:57 PM, Chris Stinemetz wrote:
> Hello List,
> I'm trying to grep an array of arrays, but I am getting the following error:
>
> Can't use string ("1") as an ARRAY ref while "strict refs" in use at
> form.pl line 121, <$COORDS> line 1281.
> Press any key to continue . . .
>
Chris Stinemetz wrote:
Hello List,
Hello,
I'm trying to grep an array of arrays, but I am getting the following error:
Can't use string ("1") as an ARRAY ref while "strict refs" in use at
form.pl line 121,<$COORDS> line 1281.
Press any key to continue . . .
Below is the grep statement:
Hello List,
I'm trying to grep an array of arrays, but I am getting the following error:
Can't use string ("1") as an ARRAY ref while "strict refs" in use at
form.pl line 121, <$COORDS> line 1281.
Press any key to continue . . .
Below is the grep statement:
print grep { $_->[0][0] >= 0 } @coor
On Thu, 23 Aug 2012 10:51:09 -0700 (PDT)
Irfan Sayed wrote:
> i need to print the contents of array on separate line , so , i
> thought , i should write one function where i will print the contents
> of array on each line
Do you mean you want each item from an array on each line? If so:
$t-
On Aug 23, 2012, at 10:51 AM, Irfan Sayed wrote:
> it was quite rude. anyway
What was quite rude?
> lets say if i have to display the contents of array using insert method.
> if i just type : $t->insert("end", "@arr1");
> then surely , it will print the contents of array but on the same line
it was quite rude. anyway
lets say if i have to display the contents of array using insert method.
if i just type : $t->insert("end", "@arr1");
then surely , it will print the contents of array but on the same line
i need to print the contents of array on separate line , so , i thought , i
sho
On Thursday, August 23, 2012 at 10:15 AM, Irfan Sayed wrote:
> can someone please suggest ?
>
Explain what you're actually trying to achieve, instead of asking how to do
what you think will let you accomplish what you're trying to achieve.
Yes, if you write the insert() method properly, you cou
can someone please suggest ?
regards
irfan
From: Irfan Sayed
To: "beginners@perl.org"
Sent: Thursday, August 23, 2012 4:15 PM
Subject: insert in perl tk
hi,
can we call function in the insert method of perl tk ?
i have code like this:
$t->insert("end",
> IIRC, a long time ago I send you a patch for Sort::Maker benchmarking
> script incorporating Sort::Key variants that showed how faster my module
> can be. I would try to find it and send it to you again.
Well, I have been unable to find it... but I have redone it :-)
Attached are the patch tha
Excellent !!. Thanks Tim. Appreciate your help.
On Thu, Aug 23, 2012 at 12:22 AM, timothy adigun <2teezp...@gmail.com>wrote:
> Hi jet speed,
> I think is a lot better using hash or hash reference as implemented
> in perldsc to do this.
> Like so:
>
> #!/usr/bin/perl
> use warnings;
> use str
hi,
can we call function in the insert method of perl tk ?
i have code like this:
$t->insert("end", "\&abc");
so when this line gets executed, it should first call function abc
please suggest
regards
irfan
On 08/23/2012 09:10 AM, Uri Guttman wrote:
> On 08/23/2012 02:54 AM, Salvador Fandino wrote:
>
>>>
>>> It's a pity Sort::Maker not in Debian
>>
>> There is also Sort::Key, available in Debian testing and unstable, and
>> which is usually faster than Sort::Maker and also Sort::Key::Radix, even
>> f
On Thu, Aug 23, 2012 at 9:10 AM, Uri Guttman wrote:
> On 08/23/2012 02:54 AM, Salvador Fandino wrote:
>
>
>>> It's a pity Sort::Maker not in Debian
>>>
>>
>> There is also Sort::Key, available in Debian testing and unstable, and
>> which is usually faster than Sort::Maker and also Sort::Key::Radi
On 08/23/2012 02:54 AM, Salvador Fandino wrote:
It's a pity Sort::Maker not in Debian
There is also Sort::Key, available in Debian testing and unstable, and
which is usually faster than Sort::Maker and also Sort::Key::Radix, even
faster when sorting by numeric keys but not available in Debian
22 matches
Mail list logo