[OT] Re: Attempting to update files blanks them instead

2007-05-15 Thread Dr.Ruud
Hello Chas, All your replies are lately posted twice, and have a strange Newsgroups: header line. Newsgroups: perl.beginners,perl.beginners For example: Message-ID: [EMAIL PROTECTED] A diff between the two messages (with the same Message-ID, but with different SMTP ids) shows this: 7c7

Re: call system command

2007-05-15 Thread Dr.Ruud
Chas Owens schreef: Tatiana Lloret Iglesias: my $status = system(d:\\blast\\bin\\blastall -p blastn -i $file -d $patDB -o $workdir\\blast_$blast_file_id.txt); snip Just an unrelated note to make your life a little easier, Perl automagically uses the right directory separator if you say

Regarding perl/tk programming

2007-05-15 Thread Dharshana Eswaran
Hi All, I need to create a GUI and integrate my perl script to it. I decided to get the GUI using perl/Tk programming. I searched in the net and i am unable to get a good tutorial or any document regarding the perl/Tk programming. If anyone knows any links or have any documents, can you please

Re: Regarding perl/tk programming

2007-05-15 Thread Nigel Peck
Dharshana Eswaran wrote: I need to create a GUI and integrate my perl script to it. I decided to get the GUI using perl/Tk programming. I searched in the net and i am unable to get a good tutorial or any document regarding the perl/Tk programming. If anyone knows any links or have any

Re: regex question

2007-05-15 Thread rob . dixon
John W. Krahn writes: Tom Allison wrote: How do I pull all the words from a line between the two words 'from' and 'by' when I have NO IDEA what's in there, but I know they are all in one line. To make it more difficult. 'by' is optional... Like this: from..by.. or from..

Re: call system command

2007-05-15 Thread Chas Owens
On 5/15/07, Dr.Ruud [EMAIL PROTECTED] wrote: snip AFAIK, it is not that Perl automagically uses the right directory separator, but that the shell at hand understands both ways. How does it work with MacOS9? snip I could have sworn that it was, but I just checked perldoc perlport and my memory

Re: [OT] Re: Attempting to update files blanks them instead

2007-05-15 Thread Chas Owens
On 5/15/07, Dr.Ruud [EMAIL PROTECTED] wrote: Hello Chas, All your replies are lately posted twice, and have a strange Newsgroups: header line. Newsgroups: perl.beginners,perl.beginners snip so nz-out-0506.google.com (which has 2 IP-nrs) hands it over twice, with exactly 10 minutes in

Re: File Handling. Reading and Writting.

2007-05-15 Thread Ken Foskey
It looks as if you're trying to edit a text file in place. Although that's possible for some simple cases, it's generally easier to use Perl's $^I functionality. What is $^I? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: File Handling. Reading and Writting.

2007-05-15 Thread Chas Owens
On 5/15/07, Ken Foskey [EMAIL PROTECTED] wrote: It looks as if you're trying to edit a text file in place. Although that's possible for some simple cases, it's generally easier to use Perl's $^I functionality. What is $^I? It is a special scalar variable that turns on/off in-place

Re: Thoughts on comments

2007-05-15 Thread Ken Foskey
On Mon, 2007-05-14 at 02:16 -0400, Mathew Snyder wrote: Is it possible to use too many comments? I'm looking at a script I wrote and think I may have made it less clear by trying to make it more clear. Absolutely. Commenting in a useful clear way I believe takes years to master. Maintaining

Re: Thoughts on comments

2007-05-15 Thread Chas Owens
On 5/15/07, Ken Foskey [EMAIL PROTECTED] wrote: snip Look to the code itself first, use real names and spell them in full. I have a production system where prefix is shortened to pfx, pref, prefx. It is a nightmare to maintain. snip The problem here is not the shortening (which can be a good

how do I use a module without installing it?

2007-05-15 Thread Bryan R Harris
I'd love to use the Curses module for an upcoming script, but I don't have root on the machines it will be used on. Is it possible to use the module without installing it? If so, how is it done? TIA, - B -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: how do I use a module without installing it?

2007-05-15 Thread Chas Owens
On 5/15/07, Bryan R Harris [EMAIL PROTECTED] wrote: I'd love to use the Curses module for an upcoming script, but I don't have root on the machines it will be used on. Is it possible to use the module without installing it? If so, how is it done? snip No, you must install a module to use

Re: Thoughts on comments

2007-05-15 Thread Jeff Pang
Ken Foskey 写道: Look to the code itself first, use real names and spell them in full. I have a production system where prefix is shortened to pfx, pref, prefx. It is a nightmare to maintain. I personally agree with this.But for most programmers whose mother language is not english,wrote

qx() won't accept over (about) 128,000 characters

2007-05-15 Thread Jameson C. Burt
Within Perl, I construct programs in other programming languages and submit the result to a Unix (Linux or IBM AIX) operating system with 2GB to 8GB memory. I submit such a program to the operating system using Perl's qx() Unfortunately, giving qx() over 128,420 characters (about and can vary

Re: how do I use a module without installing it?

2007-05-15 Thread Bryan R Harris
On 5/15/07, Bryan R Harris [EMAIL PROTECTED] wrote: I'd love to use the Curses module for an upcoming script, but I don't have root on the machines it will be used on. Is it possible to use the module without installing it? If so, how is it done? snip No, you must install a module

Re: how do I use a module without installing it?

2007-05-15 Thread Jeff Pang
Bryan R Harris 写道: I'd love to use the Curses module for an upcoming script, but I don't have root on the machines it will be used on. Is it possible to use the module without installing it? From perldoc, How do I keep my own module/library directory? When you build modules,

Re: qx() won't accept over (about) 128,000 characters

2007-05-15 Thread John W. Krahn
Jameson C. Burt wrote: Within Perl, I construct programs in other programming languages and submit the result to a Unix (Linux or IBM AIX) operating system with 2GB to 8GB memory. I submit such a program to the operating system using Perl's qx() Unfortunately, giving qx() over 128,420

Assign a delimiter variable

2007-05-15 Thread Mike Blezien
Hello, this one has been driving me nuts and I'm sure it's something very simple I maybe overlooking. I need to assign a delimiter variable IE: Pipe or Comma delimiter: my $del = '|'; # use either a '|' or ',' my $dataline = 0|1|2|3|4|5|6|7|8|9; my @data = split(/$del/,

Re: Assign a delimiter variable

2007-05-15 Thread Xavier Noria
On May 15, 2007, at 6:42 PM, Mike Blezien wrote: Hello, this one has been driving me nuts and I'm sure it's something very simple I maybe overlooking. I need to assign a delimiter variable IE: Pipe or Comma delimiter: my $del = '|'; # use either a '|' or ',' my $dataline =

Re: Assign a delimiter variable

2007-05-15 Thread Xavier Noria
On May 15, 2007, at 6:49 PM, Xavier Noria wrote: To prevent this there's quotemeta(), which is available in literals as \E: Oh sorry, I meant \Q there. -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Assign a delimiter variable

2007-05-15 Thread Mike Blezien
Hello, - Original Message - From: Xavier Noria [EMAIL PROTECTED] To: Perl List beginners@perl.org Sent: Tuesday, May 15, 2007 11:49 AM Subject: Re: Assign a delimiter variable On May 15, 2007, at 6:42 PM, Mike Blezien wrote: Hello, this one has been driving me nuts and I'm sure

Re: how do I use a module without installing it?

2007-05-15 Thread Chas Owens
On 5/15/07, Jeff Pang [EMAIL PROTECTED] wrote: Bryan R Harris 写道: I'd love to use the Curses module for an upcoming script, but I don't have root on the machines it will be used on. Is it possible to use the module without installing it? From perldoc, How do I keep my own

Re: how do I use a module without installing it?

2007-05-15 Thread Bryan R Harris
Bryan R Harris: I'd love to use the Curses module for an upcoming script, but I don't have root on the machines it will be used on. Is it possible to use the module without installing it? From perldoc, How do I keep my own module/library directory? When you build

Re: Attempting to update files blanks them instead

2007-05-15 Thread Kent Frazier
That did the trick. I figured it had to be something simple. To my credit, the book had it wrong too. Anyways, thanks for your help. On 5/14/07, Chas Owens [EMAIL PROTECTED] wrote: On 5/14/07, Kent Frazier [EMAIL PROTECTED] wrote: snip Can someone with a more honed eye for this code tell

Re: File Handling. Reading and Writting.

2007-05-15 Thread Bruno Schroeder
Hello Tom! Hello All! You helped a lot Tom. Still... I have some trouble. For sure $^I is easier to use. Although in my case i would need to rewrite a lot of code. I will do it, but it will take a while to test it. I found good information on $^I at

Re: how do I use a module without installing it?

2007-05-15 Thread Chas Owens
On 5/15/07, Bryan R Harris [EMAIL PROTECTED] wrote: snip It worked! Sort of... According to the camel book, use lib looks for $dir/$archname/auto, but $archname isn't defined and I don't know what it's supposed to be... How can I find out what it's supposed to be? You don't, you just set

RE: LibXML help

2007-05-15 Thread Tony Heal
For those of you interested. Here was the problem and solution. the xconf (xml) file had a call to a dtd file at line 2 and that was causing all my headaches. I removed that line before parsing and all worked fine. Thanks to all for the help. Tony -Original Message- From: Tony Heal

Re: how do I use a module without installing it?

2007-05-15 Thread Bryan R Harris
On 5/15/07, Bryan R Harris [EMAIL PROTECTED] wrote: snip It worked! Sort of... According to the camel book, use lib looks for $dir/$archname/auto, but $archname isn't defined and I don't know what it's supposed to be... How can I find out what it's supposed to be? You don't, you

Re: how do I use a module without installing it?

2007-05-15 Thread Bryan R Harris
Ah, got it all figured out -- it works! Thanks Andrew and Chas for your help! - Bryan On 5/15/07, Bryan R Harris [EMAIL PROTECTED] wrote: snip It worked! Sort of... According to the camel book, use lib looks for $dir/$archname/auto, but $archname isn't defined and I don't know

Re: qx() won't accept over (about) 128,000 characters

2007-05-15 Thread Jameson C. Burt
On Tue, May 15, 2007 at 09:36:12AM -0700, John W. Krahn wrote: Jameson C. Burt wrote: Within Perl, I construct programs in other programming languages and submit the result to a Unix (Linux or IBM AIX) operating system with 2GB to 8GB memory. I submit such a program to the operating

Re: File Handling. Reading and Writting.

2007-05-15 Thread Tom Phoenix
On 5/15/07, Bruno Schroeder [EMAIL PROTECTED] wrote: I tryed to use seek but it did not work. Can you help me on that, please? I am using Windows XP. The following example writes at the end of the file. use strict; my $file = teste_rw.txt; open (FILE, +, $file) or die Can not open $file: $!.;

Re: qx() won't accept over (about) 128,000 characters

2007-05-15 Thread Tom Phoenix
On 5/15/07, Jameson C. Burt [EMAIL PROTECTED] wrote: Letting my imagination loose, I ponder that qx() could have a fixed buffer size, which cannot be exceeded; or Unix takes in a block of size 2^16 but not of size 2^17. But I am probably only cluttering my mind with possibilities, when the

[OT] Re: Thoughts on comments

2007-05-15 Thread Dr.Ruud
Jeff, Your messages get treated wrongly too. The end up twice on the perl beginners list, with the same Message-ID, and have a Newsgroups: header field with the groupname twice in it, just like Chas's messages. Message-ID: [EMAIL PROTECTED] The diff: 7c7 Received: (qmail 12545 invoked from

Re: [OT] Re: Thoughts on comments

2007-05-15 Thread Chas Owens
On 5/15/07, Dr.Ruud [EMAIL PROTECTED] wrote: Jeff, Your messages get treated wrongly too. The end up twice on the perl beginners list, with the same Message-ID, and have a Newsgroups: header field with the groupname twice in it, just like Chas's messages. Right, the problem has to be at

Re: qx() won't accept over (about) 128,000 characters

2007-05-15 Thread Chas Owens
On 5/15/07, Tom Phoenix [EMAIL PROTECTED] wrote: On 5/15/07, Jameson C. Burt [EMAIL PROTECTED] wrote: Letting my imagination loose, I ponder that qx() could have a fixed buffer size, which cannot be exceeded; or Unix takes in a block of size 2^16 but not of size 2^17. But I am probably

reading html hyper links as per directory structure

2007-05-15 Thread perl pra
Hello Gurus, I have a html page which has hyper links only it does not have any images. I have to read the html file get the names of the hyper link that is displayed in the page ,create a directory structure and tar/gz the files. ( I have the directories in server with same names which are

Re: reading html hyper links as per directory structure

2007-05-15 Thread Tom Phoenix
On 5/15/07, perl pra [EMAIL PROTECTED] wrote: If I could get the names of the hyperl inks that are displayed in the html file as per directory structure then I could tar/.gz the files,. But I have no idea of html parsing using perl. Have you looked on CPAN? http://search.cpan.org/ Maybe

Re: reading html hyper links as per directory structure

2007-05-15 Thread Chas Owens
On 5/15/07, perl pra [EMAIL PROTECTED] wrote: Hello Gurus, I have a html page which has hyper links only it does not have any images. I have to read the html file get the names of the hyper link that is displayed in the page ,create a directory structure and tar/gz the files. ( I have the

transform one2many table

2007-05-15 Thread Andrej Kastrin
Dear all, I want to transform one2many like table to one2one table. Original table looks as follows: 1|Michael 1|Alex 1|Bob 1|Pete 2|Bob 2|Andre 2|David 2|Alex 3|Pete and the output should be similar to; 1|Michael Alex Bob Pete 2|Bob Andre David Alex 3|Pete Table is large (4 GB), so I think

Re: transform one2many table

2007-05-15 Thread yitzle
Hashes! Untested code: while(){ chomp; ($id,$name)=split(/\|/,$_); push( @($hash{$id}, $name) ); } You can split the input file into chunks, or process one ID and then let the variable go out of scope or whatever... chomp; ($id,$name)=split(/\|/,$_); $previous_id=$id;

Re: reading html hyper links as per directory structure

2007-05-15 Thread yitzle
Are you attempting to recreate wget? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: File Handling. Reading and Writting.

2007-05-15 Thread Bruno Schroeder
Thank you Tom! We realy have lots of ways to do everything. In this case, is easier to use $^I functionality, and I did. Although, it is very nice to see this code bellow. Cheers! Tom Phoenix [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 5/15/07, Bruno Schroeder [EMAIL

Re: [OT] Re: Thoughts on comments

2007-05-15 Thread Jeff Pang
Dr.Ruud 写道: Jeff, Your messages get treated wrongly too. The end up twice on the perl beginners list, with the same Message-ID, and have a Newsgroups: header field with the groupname twice in it, just like Chas's messages. I don't know what happened.I've changed from my premium Earthlink to

Re: Assign a delimiter variable

2007-05-15 Thread Jeff Pang
Mike Blezien 写道: Hello, this one has been driving me nuts and I'm sure it's something very simple I maybe overlooking. I need to assign a delimiter variable IE: Pipe or Comma delimiter: my $del = '|'; # use either a '|' or ',' my $dataline = 0|1|2|3|4|5|6|7|8|9; my @data =

output with utf8

2007-05-15 Thread Jen mlists
Hello, I need to output contents with utf8 encoding in CGI scripts. Can you tell me how to open STDOUT with utf8 support?Thanks you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: output with utf8

2007-05-15 Thread yitzle
Check out http://perldoc.perl.org/encoding.html On 5/15/07, Jen mlists [EMAIL PROTECTED] wrote: Hello, I need to output contents with utf8 encoding in CGI scripts. Can you tell me how to open STDOUT with utf8 support?Thanks you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Chinese word problem

2007-05-15 Thread Neil
Dear All: Question: How come the length of Chinese word I print shows “ 3 “. Isn’t it supposed to 2 bytes? Program: --- $str=”我”; $str_len = length($str); Print $str_len, “\n\n”; The result is 3 I took a