Re: wait time

2007-04-04 Thread Nilesh Patil
You can use "sleep". On Thursday 05 April 2007 06:03, Brandino Andreas wrote: Hi all, is there any function i can use to add some seconds of delay in my program?? Thanks <> --- --- --- <> Brandino Andreas [EMAIL PROTECTED] <> --- --- --- <> -- Regards, Nil

wait time

2007-04-04 Thread Brandino Andreas
Hi all, is there any function i can use to add some seconds of delay in my program?? Thanks <> --- --- --- <> Brandino Andreas [EMAIL PROTECTED] <> --- --- --- <> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] h

Re: removing special characters

2007-04-04 Thread Dave Gray
On 4/4/07, Michael Gargiullo <[EMAIL PROTECTED]> wrote: I have a log file I'm parsing that has special characters at the end of each row. In vi it appears to be ^@ I've already tried chomp and s/\^\@// Neither work. Does any one have any ideas? You can match what vi(m) displays as '^@'

Re: Beginner question about XML::Simple

2007-04-04 Thread Rob Dixon
Gerben Wierda wrote: I've got a XML file that contains the following snippet

Re: run system command in the background using CGI

2007-04-04 Thread Jeff Pang
>I have web page that downloads and extracts images based on file >selection. The thank you page will not be displayed until the download >is complete... (Understandable). One of the download files is quite big >and the web server is timing out. I would like to thank you page to be >displayed ins

Re: Can I map this

2007-04-04 Thread Rob Dixon
Beginner wrote: I have a list of names all in uppercase that I would like to capitaIise. I can't help but think that map could make short work of this loop but I am not sure how. Is it possible to use map here instead of a for loop? I can see there are going to be issues with double-barrelle

Re: Can I map this

2007-04-04 Thread Igor Sutton Lopes
On 2007/04/04, at 18:12, Randal L. Schwartz wrote: "Igor" == Igor Sutton Lopes <[EMAIL PROTECTED]> writes: Igor> my $str = join( " ", map { s/\B(\w+)/\L\1/; $_ } split( / \s+/, $_ ) ); It's bad style to modify $_ in a map, because that also modifies the incoming data. The simplest

Re: create gui

2007-04-04 Thread Daniel Kasak
xavier mas wrote: Hi list, I want to create an interface with Per,l like a form for a database. Searching in cpan.org I found many Qtk and Tk modules, but I really don't know what I need in order to create Perl programs that can be handled through an interface. Can you advise me on that?

Re: Merge CSV Data Files - Ideas on how to do this.

2007-04-04 Thread Mumia W.
On 04/04/2007 02:56 PM, Bill wrote: Hi all. I have bunch of CSV files that have the same data. This data is sent to clients. Then the data is returned back with the Active/Remove field filled. This field is only filled by 1 client. All the files are returned back. Once they are returned back

Re: Merge CSV Data Files - Ideas on how to do this.

2007-04-04 Thread Chas Owens
On 4/4/07, Bill <[EMAIL PROTECTED]> wrote: Chase, Thanks for the quick reply. I am not familiar with how to go about doing this. Do i need a module to do this? could you point me to some documentation or something that i can look at? Thanks - Bill snip Old school functions: perldoc -f dbmo

Re: Merge CSV Data Files - Ideas on how to do this.

2007-04-04 Thread Bill
Chase, Thanks for the quick reply. I am not familiar with how to go about doing this. Do i need a module to do this? could you point me to some documentation or something that i can look at? Thanks - Bill - Original Message From: Chas Owens <[EMAIL PROTECTED]> To: Bill <[EMAIL PR

Re: Merge CSV Data Files - Ideas on how to do this.

2007-04-04 Thread Chas Owens
On 4/4/07, Bill <[EMAIL PROTECTED]> wrote: snip I just wanted to run this by the group and find out a more efficient way to do this. snip If you are worried about memory try a hash tied to a db file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Merge CSV Data Files - Ideas on how to do this.

2007-04-04 Thread Bill
Hi all. I have bunch of CSV files that have the same data. This data is sent to clients. Then the data is returned back with the Active/Remove field filled. This field is only filled by 1 client. All the files are returned back. Once they are returned back I need a script that will go throu

Beginner question about XML::Simple

2007-04-04 Thread Gerben Wierda
I've got a XML file that contains the following snippet Readin

run system command in the background using CGI

2007-04-04 Thread Brian Volk
Hello, I have web page that downloads and extracts images based on file selection. The thank you page will not be displayed until the download is complete... (Understandable). One of the download files is quite big and the web server is timing out. I would like to thank you page to be displaye

Japanese characters in utf8 and DBD::MySQL

2007-04-04 Thread Jb Van Puyvelde
Hello, I would like to insert japanese characters into a MySql table, but it just produces stange symbols. In a nutshell, I would like to cut up a japanese html page in little chunks and insert them into a database. I've no problem for reading the page and printing the japanese characters on s

Re: Using case in Perl

2007-04-04 Thread oryann9
--- > > Perl doesn't have the "switch" control statement. > But you can get it by looking at CPAN: > http://search.cpan.org/~rgarcia/Switch-2.13/Switch.pm > To share some information in the up-incoming Perl 5.10 there will be a replacement for the switch clause. The given-when is the Perl answe

Re: Can I map this

2007-04-04 Thread John W. Krahn
Beginner wrote: > Hi All, Hello, > I have a list of names all in uppercase that I would like to > capitaIise. I can't help but think that map could make short work of > this loop but I am not sure how. Is it possible to use map here > instead of a for loop? I can see there are going to be issu

Re: Can I map this

2007-04-04 Thread Randal L. Schwartz
> "Igor" == Igor Sutton Lopes <[EMAIL PROTECTED]> writes: Igor> my $str = join( " ", map { s/\B(\w+)/\L\1/; $_ } split( /\s+/, $_ ) ); It's bad style to modify $_ in a map, because that also modifies the incoming data. The simplest workaround is adding local: @out = map { local $_ = $

Re: Can I map this

2007-04-04 Thread John W. Krahn
Beginner wrote: > Hi All, Hello, > I have a list of names all in uppercase that I would like to > capitaIise. I can't help but think that map could make short work of > this loop but I am not sure how. Is it possible to use map here > instead of a for loop? I can see there are going to be issu

Re: perl 5.10 questions

2007-04-04 Thread oryann9
> But this is all fairly complicated stuff and > probably a little advanced > for a beginners list. You might find more joy > asking on > comp.lang.perl.moderated, or perlmonks. > > -- > Paul Johnson - [EMAIL PROTECTED] yes but there are a lot of advanced members on the list. ok thanks for r

Re: Can I map this

2007-04-04 Thread Jason Roth
my $str = join " ", map { ucfirst lc } @words; should do what your for loop is doing. -Jason On 4/4/07, Beginner <[EMAIL PROTECTED]> wrote: Hi All, I have a list of names all in uppercase that I would like to capitaIise. I can't help but think that map could make short work of this loop but I

Re: Can I map this

2007-04-04 Thread Igor Sutton Lopes
On 2007/04/04, at 16:28, Beginner wrote: while () { my @words = split(/\s+/,$_); my $str; foreach my $w (@words) { my $s = lc($w); $s = ucfirst($s); $str .= $s.' '; } print "STR=$str\n"; } __DATA__ SOME NAME SOMEONE WITH FOUR NAMES ONE WITH THREE A-HYPENED NAME

Re: removing special characters

2007-04-04 Thread Tom Phoenix
On 4/4/07, Michael Gargiullo <[EMAIL PROTECTED]> wrote: I have a log file I'm parsing that has special characters at the end of each row. In vi it appears to be ^@ You can use a hex-dump utility to see what characters are actually in the file. On unix, I often use od. But if I've got the dat

Can I map this

2007-04-04 Thread Beginner
Hi All, I have a list of names all in uppercase that I would like to capitaIise. I can't help but think that map could make short work of this loop but I am not sure how. Is it possible to use map here instead of a for loop? I can see there are going to be issues with double-barrelled names bu

Re: removing special characters

2007-04-04 Thread Chas Owens
On 4/4/07, Michael Gargiullo <[EMAIL PROTECTED]> wrote: I have a log file I'm parsing that has special characters at the end of each row. In vi it appears to be ^@ I've already tried chomp and s/\^\@// Neither work. Does any one have any ideas? snip ^@ is one character not two. It is a

Re: removing special characters

2007-04-04 Thread Jeff Pang
>I have a log file I’m parsing that has special characters at the end of each >row. In vi it appears to be ^@ I’ve already tried chomp and s/\^\@// >Neither work. Does any one have any ideas? > For the fast resolving,you can use the unix shell command "dos2unix" to translate it. $ dos2un

removing special characters

2007-04-04 Thread Michael Gargiullo
I have a log file I’m parsing that has special characters at the end of each row. In vi it appears to be ^@ I’ve already tried chomp and s/\^\@// Neither work. Does any one have any ideas? -Mike -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / V

Re: Using case in Perl

2007-04-04 Thread Chas Owens
On 4/4/07, Igor Sutton Lopes <[EMAIL PROTECTED]> wrote: snip unless (fork) { snip The fork function has three returns: undef, zero, and non-zero. It returns 0 to the child and a pid that is non-zero to the parent on success or undef to the parent on failure. It is important to catch this

Re: Using case in Perl

2007-04-04 Thread Igor Sutton Lopes
On 2007/04/04, at 14:58, Jeff Pang wrote: How about this? if ($ARGV[0] eq 'start') { print "Starting PostgreSQL:\n"; unless (fork) { exec "su - $PGUSER -c \"$DAEMON -D \'$PGDATA\' "; }else { print "ok\n"; exit; } } elsif ($ARGV[0] eq 'stop') { ..

Re: Using case in Perl

2007-04-04 Thread Jeff Pang
>In bash i have: > >#case $1 in ># start) ># $ECHO_N "Starting PostgreSQL: "$ECHO_C ># su - $PGUSER -c "$DAEMON -D '$PGDATA' &" >>>$PGLOG 2>&1 ># echo "ok" ># ;; > >In perl, How I to build it ? > How about this? if ($ARGV[0] eq 'start') { print "Starting PostgreSQL:\

Using case in Perl

2007-04-04 Thread Rodrigo Tavares
Hello, I'm changing the script postgresq-init.sh for postgresql-init.pl. I made all perl scripts for store the database names. But my doubt is the case. In bash i have: #case $1 in # start) # $ECHO_N "Starting PostgreSQL: "$ECHO_C # su - $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG

Re: how to know the object type

2007-04-04 Thread Ovid
--- Jeff Pang <[EMAIL PROTECTED]> wrote: > > > >If I'm not mistaken, all Perl objects are references to a hash. > > > > Not correct at all. > Perl objects can be anything that's the blessed references. This is correct. It's another reason why you don't want to care about what data structure