RE: Command line parameters

2005-04-13 Thread Thomas Bätzler
Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > I want to write a perl script like "gnu less". > > My perl script accepts input on STDIN or filename(s) as arguments. > If both are missing it should print the error message. How do > I do this ? There is always input on STDIN - even a straig

POD for Win32::GUI?

2005-04-13 Thread Octavian Rasnita
Hi, Does anyone know where I can get some help for using Win32::GUI? I have seen that module doesn't have POD documentation inside (or outside). Thank you. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Command line parameters

2005-04-13 Thread Ramprasad A Padmanabhan
On Wed, 2005-04-13 at 12:32, Thomas BÃtzler wrote: > Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > > I want to write a perl script like "gnu less". > > > > My perl script accepts input on STDIN or filename(s) as arguments. > > If both are missing it should print the error message. How do

Re: Win32::IE::Mechanize load question

2005-04-13 Thread Ing. Branislav Gerzo
Ing. Branislav Gerzo [IBG], on Friday, April 8, 2005 at 12:47 (+0200) wrote: IBG> so I played with these values, also put $ie->get in loop, but nothing IBG> helps. So there is no workaround and I have to use sleep ? on another forum we've found answer, it works only sometimes, but it is always be

shift what?

2005-04-13 Thread liyf_zb
Hi all. I always see like : $a=shift; . shift what? @_ ? And how dose it work? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: shift what?

2005-04-13 Thread Jesper Krogh
I gmane.comp.lang.perl.beginners, skrev [EMAIL PROTECTED]: > Hi all. > I always see like : > > $a=shift; > . > shift what? @_ ? Yes > And how dose it work? $ perldoc -f shift Jesper -- ./Jesper Krogh, [EMAIL PROTECTED], Jabber ID: [EMAIL PROTECTED] ... der er blevet medlem af

file - uplaod 0 byte file

2005-04-13 Thread webmaster
Hello, i have a problem after changing form perl 5.6.2 to 5.8. my upload program for files does not work anymore, the read($fie, $buffer, 2048) is always empty my Programm starts like this [code] #!/usr/bin/perl .. bla bla.. use CGI; $q = new CGI; %form = get_form_values(); .. bla bla.. print

regex explanation?

2005-04-13 Thread Graeme McLaren
Morning all, would anyone be able to explain this regular expression: /^[\w ,.!?\-'"\(\)\s]+$/ I'm going to read up on it but I'm in a hurry for this. Cheers, Graeme :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Command line parameters

2005-04-13 Thread John Doe
Am Mittwoch, 13. April 2005 10.46 schrieb Ramprasad A Padmanabhan: > On Wed, 2005-04-13 at 12:32, Thomas BÃtzler wrote: > > Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > > > I want to write a perl script like "gnu less". > > > > > > My perl script accepts input on STDIN or filename(s) as arg

Re: shift what?

2005-04-13 Thread Owen Cook
On Wed, 13 Apr 2005 [EMAIL PROTECTED] wrote: > Hi all. > I always see like : > > $a=shift; > . > shift what? @_ ? > > And how dose it work? Try this example and see if you understand what is happening. --- #!/usr/bin/perl use strict; my @array=

Re: choosing the correct attachment

2005-04-13 Thread John Doe
Hi Brian > Hi All, > > I thought I had this figured out but I was wrong. The part I'm having > trouble w/ is getting the loop to attach the correct html_file. Right now > that program will attach this file every time: > > my $html_file = 'c:\brian\test\html\12345.htm'; This is exactly what you

Re: Command line parameters

2005-04-13 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: I want to write a perl script like "gnu less". My perl script accepts input on STDIN or filename(s) as arguments. If both are missing it should print the error message. How do I do this ? The pseudocode will be -- IF INPUT ON STDIN ;then Process ST

Re: regex explanation?

2005-04-13 Thread Ing. Branislav Gerzo
Graeme McLaren [GM], on Wednesday, April 13, 2005 at 11:23 (+0100) thoughtfully wrote the following: GM> /^[\w ,.!?\-'"\(\)\s]+$/ string have to start and end (so string must contain) these characters: [a-zA-Z0-9_-(white_spaces)...] and all strings you can see there. also " " therese should't be.

Re: regex explanation?

2005-04-13 Thread John W. Krahn
Graeme McLaren wrote: Morning all, would anyone be able to explain this regular expression: /^[\w ,.!?\-'"\(\)\s]+$/ I'm going to read up on it but I'm in a hurry for this. Everything inside [] defines a character class which is a list of characters, any one of which can match a single character i

Citation Parsing

2005-04-13 Thread N. Ganesh Babu
Dear All, Basically i need to convert the plain text citations into xml tagged citations. I thought we can do it through regular expressions. After going around the Internet I found a wonderful module. Biblio::Citation::Parser The main feature in this module is matching templates. Already this

Re: Searching for embedded EOF in binary

2005-04-13 Thread John W. Krahn
Jay Savage wrote: On 4/12/05, John W. Krahn <[EMAIL PROTECTED]> wrote: while (!eof) { You need to specify the filehandle you are reading from. A bare eof operates on the last filehandle read from. perldoc -f eof. The only place I'm going to get EOF from the OS here is IMG, and it works as expected

Re: file - uplaod 0 byte file

2005-04-13 Thread John Doe
Am Mittwoch, 13. April 2005 12.05 schrieb [EMAIL PROTECTED]: > Hello, > > i have a problem after changing form perl 5.6.2 to 5.8. > my upload program for files does not work anymore, Did it ever? > the > read($fie, $buffer, 2048) is always empty $fie is nowhere in your code. > > > my Programm

Re: shift what?

2005-04-13 Thread Randal L. Schwartz
> "Jesper" == Jesper Krogh <[EMAIL PROTECTED]> writes: >> $a=shift; >> . >> shift what? @_ ? Jesper> Yes Sometimes. shift defaults to @ARGV when outside a subroutine, and @_ when inside a subroutine, the argument being that those are both "arguments". :) -- Randal L. Schwartz - Stoneh

RE: Switch -- confused

2005-04-13 Thread David Gilden
Greetings, Thanks for the help so far, I am added switch... but not sure that I have syntax correct Maybe this is best written as if else logic and or: my $action = $q->param( "action" ); SWITCH ($action) { if (/Upload/) { last SWITCH; }; etc... -

Re: Searching for embedded EOF in binary

2005-04-13 Thread Jay Savage
On 4/13/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Jay Savage wrote: > > On 4/12/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > > > >>>while (!eof) { > >> > >>You need to specify the filehandle you are reading from. > > > > A bare eof operates on the last filehandle read from. perldoc -f eof. >

RE: choosing the correct attachment

2005-04-13 Thread Brian Volk
Sorry to re-post so quickly, but I got it figured out. Thanks! below > > > Hi Brian > > Hello, > > > > > > Hi All, > > > > > > I thought I had this figured out but I was wrong. The part > > I'm having > > > trouble w/ is getting the loop to attach the correct > > html_file. Right no

RE: choosing the correct attachment

2005-04-13 Thread Brian Volk
> Hi Brian Hello, > > > Hi All, > > > > I thought I had this figured out but I was wrong. The part > I'm having > > trouble w/ is getting the loop to attach the correct > html_file. Right now > > that program will attach this file every time: > > > > my $html_file = 'c:\brian\test\html\12345

Re: Operation `eq': no method

2005-04-13 Thread JupiterHost.Net
Anish Kumar K wrote: Hi All Hello, The code gives strange error $subject = I get some value from the function if ($subject eq '' || !defined $subject) { Some operation } Operation `eq': no method found, left argument in overloaded package XML::LibXML::NodeList, right argument has no ov

Re: Operation `eq': no method

2005-04-13 Thread Gerhard Meier
On Wed, Apr 13, 2005 at 08:38:25AM +0200, Ing. Branislav Gerzo wrote: > AKK> if ($subject eq '' || !defined $subject) > > why you don't use: > unless ($subject) { some_operation } Maybe "0" is a valid subject. /GM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Citation Parsing

2005-04-13 Thread Offer Kaye
On 4/13/05, N. Ganesh Bab wrote: > > The main feature in this module is matching templates. Already this > module is having 400 templates. But in all the templates, It is parsing > only one author information. It is leaving the rest of the authors. > Are you sure about this? Are you using: my

Re: Searching for embedded EOF in binary

2005-04-13 Thread Offer Kaye
On 4/13/05, Jay Savage wrote: > > I'm thinking now that I should probably just take what I can get from > the recovery I have, and postprocess the recovered files, instead of > trying to get the recovery itself to be clean. > Silly question probably, but why don't you take everything from one $m

Re: Command line parameters

2005-04-13 Thread Jay Savage
On 4/13/05, John Doe <[EMAIL PROTECTED]> wrote: > Am Mittwoch, 13. April 2005 10.46 schrieb Ramprasad A Padmanabhan: > > On Wed, 2005-04-13 at 12:32, Thomas Bätzler wrote: > > > Ramprasad A Padmanabhan <[EMAIL PROTECTED]> asked: > > > > I want to write a perl script like "gnu less". > > > > > > > >

Re: Searching for embedded EOF in binary

2005-04-13 Thread Offer Kaye
On 4/13/05, Jay Savage wrote: > Hi, all: > > Below is a script to extract jpegs from an image of a corrupted or > accidentally erased CF or other removable media from a digital camera. Here's another one, found by Googling. Maybe it will help: http://www.zinkwazi.com/tools/jpg-recover -- Offer

Re: Searching for embedded EOF in binary

2005-04-13 Thread Jay Savage
On 4/13/05, Offer Kaye <[EMAIL PROTECTED]> wrote: > On 4/13/05, Jay Savage wrote: > > > > I'm thinking now that I should probably just take what I can get from > > the recovery I have, and postprocess the recovered files, instead of > > trying to get the recovery itself to be clean. > > > > Silly

Re: Searching for embedded EOF in binary

2005-04-13 Thread Jay Savage
On 4/13/05, Offer Kaye <[EMAIL PROTECTED]> wrote: > On 4/13/05, Jay Savage wrote: > > Hi, all: > > > > Below is a script to extract jpegs from an image of a corrupted or > > accidentally erased CF or other removable media from a digital camera. > > Here's another one, found by Googling. Maybe it wi

First time with CPAN

2005-04-13 Thread Walter A Poor Jr
Hello. I am trying to install a CPAN module (Spreadsheet::ParseExcel) on a Windows PC. My difficulty is that the author had unix in mind, and is not sure how the makefile should be run in Windows. Perl itself will not handle the makefile, and the simple-minded attempt to run the makefile dir

Passing command line arguments

2005-04-13 Thread Bret Goodfellow
I have a script that is reading input from ARGV. The script is being passed a file name as follows: datefile.pl c:\program files\IBM\SQLLIB\DB2\db2diag.log The problem I am running into is that the space is not recognized in the argument. All that I get passed to is is c:\program. How do

RE: Passing command line arguments

2005-04-13 Thread Moon, John
Subject: Passing command line arguments I have a script that is reading input from ARGV. The script is being passed a file name as follows: datefile.pl c:\program files\IBM\SQLLIB\DB2\db2diag.log The problem I am running into is that the space is not recognized in the argument. All that I ge

Re: Uniq from array ?

2005-04-13 Thread M. Kristall
Chris Devers wrote: On Wed, 30 Mar 2005, Peter Rabbitson wrote: Anyway my 2c - I myself use the [$elided] archives quite a bit, which does not prevent me from owning hard prints of the Cookbook, the Pocket Ref and recently Object Oriented Perl. It however prevents from owning 2 pcs of each of t

Re: Uniq from array ?

2005-04-13 Thread Chris Devers
On Wed, 13 Apr 2005, M. Kristall wrote: > Who do you think has more viewers? This particular thread or Google? Google links to things, in part, because people mention them online. When *Google* sees this thread, it will register that as a positive vote for the site in question, and will as a r

Re: First time with CPAN

2005-04-13 Thread John W. Krahn
Walter A Poor Jr wrote: Hello. Hello, I am trying to install a CPAN module (Spreadsheet::ParseExcel) on a Windows PC. My difficulty is that the author had unix in mind, and is not sure how the makefile should be run in Windows. Perl itself will not handle the makefile, and the simple-minded at

RE: Preventing CPU spikes / was switch confusion

2005-04-13 Thread David Gilden
Dear Perl Gurus, I have some problems that I think are a result of how my Switch statement is written. This script is invoked via a web browser to upload a file, and do a few other things. However it appears that the user system / network, or my script is stalling. So the user clicks the butt

Re: Searching for embedded EOF in binary

2005-04-13 Thread John W. Krahn
Jay Savage wrote: On 4/13/05, John W. Krahn <[EMAIL PROTECTED]> wrote: That is usually the case, but are you sure that the "sectors" are 512 bytes in length? I'm comfortable with this. All the FAT16 docs say "almost always". Clusters can be of varying sizes, but they're multiples of 512 bytes se

'format' puzzle

2005-04-13 Thread Sam
How can I create a perl 'format' string that begins with a comment (#)? Eg. format STDOUT_TOP = # Field1 Field2 @<< @||| @||| . If I try '\#' then I see the backslash. I just want the pound char. TIA, -Sam __ Do you Yahoo!? Yaho

Re: Preventing CPU spikes / was switch confusion

2005-04-13 Thread Offer Kaye
On 4/14/05, David Gilden wrote: > use strict; Where is "use warnings;" ? It seems to be missing ;-) > use switch; Shouldn't that be "use Switch;" (with a capital "S")? Read "perldoc Switch", the usage syntax is well documented there. -- Offer Kaye -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: First time with CPAN

2005-04-13 Thread Alfred Vahau
Hi, In windows you use nmake which you can download from the MS site. Alfred, Walter A Poor Jr wrote: Hello. I am trying to install a CPAN module (Spreadsheet::ParseExcel) on a Windows PC. My difficulty is that the author had unix in mind, and is not sure how the makefile should be run in Window

Re: First time with CPAN

2005-04-13 Thread N. Ganesh Babu
Dear Walt, Which perl distribution you are using. For windows, Activestate perl is recommended. This distribution comes along with the PPM package, which is very user friendly with windows systems. All modules are also available in zip formats on activestate website itself. 1. Download the zip