gt; > > {
> > > $c = localtime();
> > > return $c;
> > > }
> > >
> > > so whenever i call insert method , it shud call function gettime
> > > and print the latest time in the text box
> > > please suggest
> > >
> > > re
o whenever i call insert method , it shud call function gettime
> > and print the latest time in the text box
> > please suggest
> >
> > regards
> > irfan
> >
> >
> >
> >
> >
> >
> > From: Jim G
thanks.
it worked!
regards
irfan
From: Shekar
To: Irfan Sayed
Cc: Jim Gibson ; Perl Beginners
Sent: Friday, August 24, 2012 12:23 PM
Subject: Re: insert in perl tk
Try this.
$t->insert("end", &gettime);
--
Shekar
On Fri, Aug 24, 2012 at 11:58 AM, Irfan Sayed
$c = localtime();
> return $c;
> }
>
> so whenever i call insert method , it shud call function gettime and print
> the latest time in the text box
> please suggest
>
> regards
> irfan
>
>
>
>
>
>
> From: Jim Gibson
>
_
From: Jim Gibson
To: Perl Beginners
Sent: Friday, August 24, 2012 11:13 AM
Subject: Re: insert in perl tk
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 ca
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
Sent: Thursday, August 23, 2012 11:40 PM
Subject: Re: insert in perl tk
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
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
ne , so , i thought , i
should write one function where i will print the contents of array on each line
and call that function from insert method
please suggest
regards
irfan
From: John SJ Anderson
To: "beginners@perl.org"
Sent: Thursday, August 23,
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",
On 05/07/2012 04:47 PM, timothy adigun wrote:
sub get_data {
my ($file) = @_;
my $arr_ref = [];
open my $fh, '<', $file or die "can't open this file: $!";
while (<$fh>) {
chomp;
push @$arr_ref, $_;
}
close $fh or die "can't close file:$!";
ret
On Mon, May 7, 2012 at 11:29 PM, John W. Krahn wrote:
> timothy adigun wrote:
>
>>
>> On Mon, May 7, 2012 at 8:36 AM, lina wrote:
>>
>> I have two files, one with
>>>
>>> 3
>>> 2
>>> 1
>>>
>>> another is:
>>>
>>> 3 1
>>> 3 2
>>> 6 3
>>>
>>> How can I insert the first file into the middle of the
timothy adigun wrote:
On Mon, May 7, 2012 at 8:36 AM, lina wrote:
I have two files, one with
3
2
1
another is:
3 1
3 2
6 3
How can I insert the first file into the middle of the second file,
This is one way to do it:
#!/usr/bin/perl
use warnings;
use strict;
my $part1 = get_data(
Hi lina
On Mon, May 7, 2012 at 8:36 AM, lina wrote:
> Hi,
>
> I have two files, one with
>
> 3
> 2
> 1
>
> another is:
>
> 3 1
> 3 2
> 6 3
>
> How can I insert the first file into the middle of the second file,
>
This is one way to do it:
#!/usr/bin/perl
use warnings;
use strict;
my $part1
On May 7, 2012, at 5:51 AM, lina wrote:
> On Mon, May 7, 2012 at 7:52 PM, Shawn H Corey wrote:
>> On 12-05-07 03:36 AM, lina wrote:
>>>
>>> How can I insert the first file into the middle of the second file,
>>
>>
>> What code have you tried so far and please provide the expected output for
>
On Mon, May 7, 2012 at 7:52 PM, Shawn H Corey wrote:
> On 12-05-07 03:36 AM, lina wrote:
>>
>> How can I insert the first file into the middle of the second file,
>
>
> What code have you tried so far and please provide the expected output for
> your example.
>
I can only write some preamble, her
On 12-05-07 03:36 AM, lina wrote:
How can I insert the first file into the middle of the second file,
What code have you tried so far and please provide the expected output
for your example.
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and
At 8:37 PM -0800 3/9/12, Noah wrote:
Hi there,
I am trying to insert a '.' every four characters. Say I have a $it
= '123456789012' and want the result to be '1234.5678.9012'
whats one of the smoothest ways to do that?
You could adapt the method suggested by 'perldoc -q commas' "How can
I
> On 3/9/12 8:37 PM, Noah wrote:
>> Hi there,
>>
>> I am trying to insert a '.' every four characters. Say I have a $it
>> =
>> '123456789012' and want the result to be '1234.5678.9012'
>>
>> whats one of the smoothest ways to do that?
>
>
> okay I answered my own question. I am wondering if ther
On 3/9/12 8:37 PM, Noah wrote:
Hi there,
I am trying to insert a '.' every four characters. Say I have a $it =
'123456789012' and want the result to be '1234.5678.9012'
whats one of the smoothest ways to do that?
okay I answered my own question. I am wondering if there is a different
way?
>> Hi,
>>
>> I have a string that has value delimited by space
>> e.g. 1 2 10 8 etc.
>>
>> I need to add a keyword wherever there is a space.
>> I wrote a small code to try this out:
>>
>> $str = "one two three";
>> $str =~ s/\s/x /g;
>>
>> In this case, I am trying to insert x where there is a spa
On Mon, Nov 10, 2008 at 09:26, Sharan Basappa <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a string that has value delimited by space
> e.g. 1 2 10 8 etc.
>
> I need to add a keyword wherever there is a space.
> I wrote a small code to try this out:
>
> $str = "one two three";
> $str =~ s/\s/x /g;
>
On Jan 7, 12:31 am, [EMAIL PROTECTED] wrote:
> Hi
> I'm trying to write a script that reads the data below, parses it, and
> then inserts it into the "info" table.
>
> 1:Karl Heiz:1:444-555-:441-551-6661:5:1:1:1
> 2:Helmut Schmidt:1:222-333-1234:222-555-4321:2:1:1:1
> 3:Udo Lindenberg:3:111-555
On Jan 10, 2008 10:50 PM, <[EMAIL PROTECTED]> wrote:
> Only the content of the first 2 fields is displayed:
In your shoes, I would check that 'use warnings' and 'use strict' are
in place, and other basics, then I'd start debugging at the database.
Check out the tracing facility, documented in th
On Jan 7, 1:50 pm, [EMAIL PROTECTED] (John Moon) wrote:
> [>>] ...
>
> Please try (not tested). Placeholders help me a lot:
>
> my $sth_insert = $dbh->prepare('Insert into info (id, name, grade,
> phone, cell, house, car)
>values (?,?,?,?,?,?,?)')
> or die DBI->errstr;
[>>] ...
Please try (not tested). Placeholders help me a lot:
my $sth_insert = $dbh->prepare('Insert into info (id, name, grade,
phone, cell, house, car)
values (?,?,?,?,?,?,?)')
or die DBI->errstr;
while (){
#---#
#
Saboo, Nandakishore wrote:
> Hi,
Hello,
> As Tom Phoenix said there are many ways to do it, this is one of the way we
> can do it.
>
> +++
> $string =
> "one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|";
> $added = "abc|";
>
> @tmp_array = split(/
Hi,
As Tom Phoenix said there are many ways to do it, this is one of the way we can
do it.
+++
$string =
"one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|";
$added = "abc|";
@tmp_array = split(/\|/,$string,4);
for ($i=0;$i<$#tmp_array;$i++)
{
On 5/18/06, Gerald Wheeler <[EMAIL PROTECTED]> wrote:
Wondering how I can insert a value: "abc|"
There's more than one way to do it. One way would be a substitution
(s///). Another would be to use split and join: split the line, do
whatever you need to do with the elements, then join the piece
Maxipoint Rep Office wrote:
> How insert data with Perl into multiple MySQL tables?
You need multiple INSERT statements. Use a transaction if they all need to
complete or fail together. I don't use MySQL, so I don't know how
transactions work for it specifically, but typically you just use a
combi
Connie Chan wrote:
>
> > > From: Connie Chan [mailto:[EMAIL PROTECTED]]
> > >
> > > Say, I have an input $x = "ABCDEF";
> > > and I will try to remove $x from a string,
> > > what can I do ?
> > >
> > > Is there something like :
> > >
> > > $x =~ s/$x//g;
>
> Sorry everybody I've make a mist
Sorry everybody I've make a mistake on forgetting to add a
/i operator... my problem happens just becasue of case not match
Rgds,
Connie
>
>
>
>
>
> > -Original Message-
> > From: Connie Chan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 10, 2002 3:06 PM
> > To: [E
That example compiles and works fine (does what you want it to) as is.
On Wednesday, July 10, 2002, at 06:26 PM, Connie Chan wrote:
>
>> It sounds like you want something more like:
>>
>> $string = "ABCDEFGHIJKLMNOP";
>> $x = "ABCDEF";
>> $string =~ s/$x//g;
>>
>> Or am I misunderstanding?
>>
>
> It sounds like you want something more like:
>
> $string = "ABCDEFGHIJKLMNOP";
> $x = "ABCDEF";
> $string =~ s/$x//g;
>
> Or am I misunderstanding?
>
YES!! That's exactly my case haha... sorry didn't telling in clear...
(actually, logic error, my sample seem the var kills itself)
Please
on Wed, 10 Jul 2002 22:05:58 GMT, Connie Chan wrote:
> Say, I have an input $x = "ABCDEF";
> and I will try to remove $x from a string,
> what can I do ?
>
> Is there something like :
>
> $x =~ s/$x//g;
That's just a complicated way to say
$x = '';
But this works:
#! perl -w
u
It sounds like you want something more like:
$string = "ABCDEFGHIJKLMNOP";
$x = "ABCDEF";
$string =~ s/$x//g;
Or am I misunderstanding?
-Original Message-
From: Connie Chan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 3:06 PM
To: [EMAIL PROTECTED]
Subject: Insert Var in Re
Jorge Goncalvez wrote:
>
> Hi, I have this:
>
> opendir(DIR,"$_Globals{CDROM}:/DHS3MGR/$tel_version/DHS3Linux");
> foreach (readdir(DIR)){
> unless (/([Comm]+)/){
> $box3->insert('end', $_);
> }
>
> $box3 is a browse entry.
> It works fine but
>
> My problem is ther
On Feb 7, Frank Newland said:
>I want to put a delimiter (#) between the rightmost number and the left most
>alpha
s/(\d)([^\W\d])/$1#$2/;
You can't just say (\d)(\w), because \w INCLUDES \d. You could write
something like (\d)(?!\d)(\w), which requires that the \w character after
the \d NOT
On Thu, Feb 07, 2002 at 11:27:53AM -0600, Frank wrote:
> All,
>
> My input looks like this
> ==
> 5544#1341343BORIS
> 6200#321BOWSER
> 89232652#6213VERONICA
> ===
> I want to put a delimiter (#) between the rightmost number and the left most
> alpha
> Resulting in
>
s/(\d)([a-z])/$1#$2/i;
that's not a very good way to store women's phone numbers.
I like to us a little black book.
-Original Message-
From: Frank Newland [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 12:28 PM
To: [EMAIL PROTECTED]
Subject: Insert delimiter between number
I hope you do not forget before dumping the contents of the file.
--
#!/opt/local/bin/perl
$my_file = "aa.txt";
open(IN, $my_file) or die "\n\ncannot open file\n\n";
@aa = ;
print <
@aa
EOF
;
__
William Ampeh (x3939)
Federal Reser
You can create a template html file, then insert a phrase in the middle that
is searched-and-replaced.
Such as ..
INSERTTEXT
Then the perl script would do..
$textfile="file.txt";
open(IN, $textfile) or die $!;
while() {$text.=$_;}
close(IN);
## then do the same for $htmlfile
$htmlfile=~ s/INSER
44 matches
Mail list logo