using shared lib?

2006-06-06 Thread Beast
Hello all, Just curious, is it possible to use shared library in perl? Suppose I want to use libexample.so and doesn't want to invoke the client command using system() TIA. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: defaults

2006-06-06 Thread John W. Krahn
Bryan R Harris wrote: > >>>Can someone explain what: >>> >>>$pi ||= 3; >>> >>>...means? I just saw it in Programming Perl (pp 540), but it doesn't >>>explain it. Thx! >>|| is the logical OR operator (see perldoc perlop) which says that if $pi is >>TRUE then keep the current value of $pi but if $

Re: reading Perl syntax

2006-06-06 Thread reader
"Mr. Shawn H. Corey" <[EMAIL PROTECTED]> writes: [...] > Yes, Dumper() calls its first variable VAR1 (it calls its second VAR2, > etc.). This tells more than you know. The line: > > 'file' => undef, > > means that somewhere in your code (or the class) that 'file' was > actually assigned a valu

Re: reading Perl syntax

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 19:35 -0500, [EMAIL PROTECTED] wrote: > "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> writes: > > [...] > > Harry wrote: > >> Introducing your code causes a new failure and nothing is printed. > > > Shawn wrote: > > The line: print Dumper $self; > > should be just before the li

Re: Windows: Fork and run a process in the background

2006-06-06 Thread Daniel Kasak
Timothy Johnson wrote: > Try this: > > system( "start evince /path/to/pdf.pdf" ); > > Both cheap and nasty. > That does it. Thanks :) -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7

RE: Windows: Fork and run a process in the background

2006-06-06 Thread Timothy Johnson
Try this: system( "start evince /path/to/pdf.pdf" ); Both cheap and nasty. -Original Message- From: Daniel Kasak [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 5:37 PM To: beginners@perl.org Subject: Windows: Fork and run a process in the background Greetings. I'd lik

Windows: Fork and run a process in the background

2006-06-06 Thread Daniel Kasak
Greetings. I'd like to trigger an application to open ( Acrobat Reader ), and *not* freeze my perl app while it's open. Under Linux, I do: system ( "evince /path/to/pdf.pdf &" ); The ampersand does what I need. This doesn't work under Windows. Is there a cheap & nasty workaround? -- Daniel Kas

Re: reading Perl syntax

2006-06-06 Thread reader
"Mr. Shawn H. Corey" <[EMAIL PROTECTED]> writes: [...] Harry wrote: >> Introducing your code causes a new failure and nothing is printed. Shawn wrote: > The line: print Dumper $self; > should be just before the line you posted in your earlier post: > $self->_read_file($self->{file}); I'm reall

RE: defaults

2006-06-06 Thread Charles K. Clarkson
Bryan R Harris wrote: : Is there an "&&=" also? How about "or="? All perl operators are listed in the 'perlop' file. HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer 254 968-8328 Don't tread on my bandwidth. Trim your posts. -- To unsubscribe, e

Re: defaults

2006-06-06 Thread Bryan R Harris
>> Can someone explain what: >> >> $pi ||= 3; >> >> ...means? I just saw it in Programming Perl (pp 540), but it doesn't >> explain it. Thx! > > || is the logical OR operator (see perldoc perlop) which says that if $pi is > TRUE then keep the current value of $pi but if $pi is FALSE then ass

Re: defaults

2006-06-06 Thread John W. Krahn
Bryan R Harris wrote: > > Can someone explain what: > > $pi ||= 3; > > ...means? I just saw it in Programming Perl (pp 540), but it doesn't > explain it. Thx! || is the logical OR operator (see perldoc perlop) which says that if $pi is TRUE then keep the current value of $pi but if $pi is FAL

defaults

2006-06-06 Thread Bryan R Harris
Can someone explain what: $pi ||= 3; ...means? I just saw it in Programming Perl (pp 540), but it doesn't explain it. Thx! - B -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Newline error

2006-06-06 Thread joseph
"Xavier Noria" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Jun 6, 2006, at 14:16, John W. Krahn wrote: > >> Mr. Shawn H. Corey wrote: >>> >>> $output_file =~ s/\r//g; >>> # chomp only removes linefeed characters \n >>> >>> # BTW, there is no such thing as a newline; >>> # it

Re: Newline error (Closed)

2006-06-06 Thread joseph
""Muma W."" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > joseph wrote: >> All, >> >> Just like to ask for correction on what's wrong with my script it gives >> spit out this error when i run it. >> >> Unsuccessful open on filename containing newline at disksize.pl line 8. >> Can

Re: Newline error

2006-06-06 Thread joseph
""John W. Krahn"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > joseph wrote: >> All, > > Hello, > >> Just like to ask for correction on what's wrong with my script it gives >> spit >> out this error when i run it. >> >> Unsuccessful open on filename containing newline at disksiz

Re: Multiple Page Scrape

2006-06-06 Thread kc68
Thanks, but complicated for true beginners. First issue was which of three choices was XML::Simple - I chose to install XML-Simple-DTD Reader over XML-Simpler or Test-XML-Simple. I later read that XML::Simple probably comes with active Perl. Then I read the FAQ for XML::Simple and found t

Re: Newline error

2006-06-06 Thread joseph
""Mr. Shawn H. Corey"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 2006-06-06 at 18:59 +0800, joseph wrote: >> All, >> >> Just like to ask for correction on what's wrong with my script it gives >> spit >> out this error when i run it. >> >> Unsuccessful open on filename

Re: reading Perl syntax

2006-06-06 Thread reader
"Adriano Ferreira" <[EMAIL PROTECTED]> writes: > the Perl interpreter is seeing > > within Package Foo; Gack, yes I see it now... I should have noticed that but it slid right by my unpracticed eye. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

Re: reading Perl syntax

2006-06-06 Thread Anthony Ettinger
There's a good book "PHP5 Patterns and Object Oriented Programming" which I found very instrumental in my understanding of object-oriented programming, before applying it to Perl. There are of course Perl books on the subject, and the perldocs, but I found PHP's object oriented support to be les

Re: ksh in a perl program

2006-06-06 Thread Adriano Ferreira
On 6/6/06, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: I wanted to include the shell script, abc, as I want to access a variable. The shell script, abc, actually takes a value (val) from the user. I want to use that value (val) in my perl porgram. Is that possible? Perl may take a value from the

RE: ksh in a perl program

2006-06-06 Thread Lakshmi Sailaja
Thanks a million for the response. I wanted to include the shell script, abc, as I want to access a variable. The shell script, abc, actually takes a value (val) from the user. I want to use that value (val) in my perl porgram. Is that possible? ie., I will now call abc in my perl program using s

Re: ksh in a perl program

2006-06-06 Thread Rance Hall
Adriano Ferreira wrote: On 6/6/06, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: Can I include a korn shell script in a perl program? Not include, but you certainly can execute a shell script from within a Perl program. I have done the following but I get a compilation failed error. abc is th

Re: further infos about inherited classes

2006-06-06 Thread sfantar
Mr. Shawn H. Corey a écrit : On Tue, 2006-06-06 at 20:51 +0200, sfantar wrote: Hello I would like to know if we have to install one class before the inherited classes. For instance, Do I have to install CGI before CGI::Pretty to make this work or Can I install it alone? I hope my question

Re: ksh in a perl program

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 14:06 -0500, Lakshmi Sailaja wrote: > Hello, > > Can I include a korn shell script in a perl program? > > I have done the following but I get a compilation failed error. > abc is the ksh script. > - > require "/home/xxx/yyy

Re: ksh in a perl program

2006-06-06 Thread Adriano Ferreira
On 6/6/06, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: Can I include a korn shell script in a perl program? Not include, but you certainly can execute a shell script from within a Perl program. I have done the following but I get a compilation failed error. abc is the ksh script. -

Re: reading Perl syntax

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 13:13 -0500, [EMAIL PROTECTED] wrote: > "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> writes: > > > use Data::Dumper; > > print Dumper $self; > > Thanks for the pointers... I haven't read it all yet but still trying > to get this script to run. It is inlined at the end. > >

Re: reading Perl syntax

2006-06-06 Thread Adriano Ferreira
The line below was folded, and $self->{'fookey'} = 'some value here'; #hashref accessible only within Package Foo; the Perl interpreter is seeing within Package Foo; Outputs: Can't locate object method "within" via package "Package" (perhaps you forgot to load "Package"?) at ./myOOP

ksh in a perl program

2006-06-06 Thread Lakshmi Sailaja
Hello, Can I include a korn shell script in a perl program? I have done the following but I get a compilation failed error. abc is the ksh script. - require "/home/xxx/yyy/abc"; Error: syntax error at /home/xxx/yyy/abc line 3, near "." Compilat

Re: reading Perl syntax

2006-06-06 Thread reader
"Anthony Ettinger" <[EMAIL PROTECTED]> writes: > just execute it with "perl -wl foo" > or add the shebang line: #!/usr/bin/perl -w Yes, I had done that prior to posting error output The erroring script looks like: === #!/usr/local/bin/perl -w my $foo = new Foo; print $foo->getFooKey()

Re: reading Perl syntax

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 11:44 -0700, Anthony Ettinger wrote: > just execute it with "perl -wl foo" > > or add the shebang line: #!/usr/bin/perl -w Your script should start with: #!/usr/bin/perl use strict; use warnings; -- __END__ Just my 0.0002 million dollars worth, --- Shawn

Re: further infos about inherited classes

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 20:51 +0200, sfantar wrote: > Hello > > I would like to know if we have to install one class before the > inherited classes. > For instance, Do I have to install CGI before CGI::Pretty to make this > work or Can I install it alone? > > > I hope my question is clear. > Tha

further infos about inherited classes

2006-06-06 Thread sfantar
Hello I would like to know if we have to install one class before the inherited classes. For instance, Do I have to install CGI before CGI::Pretty to make this work or Can I install it alone? I hope my question is clear. Thanks in advance for your help. -- To unsubscribe, e-mail: [EMAIL PRO

Re: reading Perl syntax

2006-06-06 Thread Anthony Ettinger
just execute it with "perl -wl foo" or add the shebang line: #!/usr/bin/perl -w On 6/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Anthony Ettinger" <[EMAIL PROTECTED]> writes: > The syntax {} is for a hashref, it's just an un-named hashref inside > that object. > > my $foo = new Foo;

Re: reading Perl syntax

2006-06-06 Thread reader
"Anthony Ettinger" <[EMAIL PROTECTED]> writes: > The syntax {} is for a hashref, it's just an un-named hashref inside > that object. > > my $foo = new Foo; > print $foo->getFooKey(); > $foo->setFooKey('new value'); > print $foo->getFooKey(); Thanks for the demo... I'm in well over my head here bu

Re: reading Perl syntax

2006-06-06 Thread reader
[EMAIL PROTECTED] writes: > I'll post only one of the two cfg files being read and you'll see it > has very little in it. The documentation with this script appears to > be out of sync with actual script so hasn't been much help. I suspect > my problem revolve around miss placing parts of the pa

Re: reading Perl syntax

2006-06-06 Thread Anthony Ettinger
On 6/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: $self->_read_file($self->{file}) $self is an blessed reference to an object (used from inside that object) $self->_read_file() is the subroutine to call defined inside that object $self->{'file'}; is a reference to a hash defined insi

Re: reading Perl syntax

2006-06-06 Thread reader
"Mr. Shawn H. Corey" <[EMAIL PROTECTED]> writes: > use Data::Dumper; > print Dumper $self; Thanks for the pointers... I haven't read it all yet but still trying to get this script to run. It is inlined at the end. Introducing your code causes a new failure and nothing is printed. [What I'm

Re: What are the problems with my CGI script

2006-06-06 Thread Anthony Ettinger
my $name = param('name') || ''; if(defined $name) { # if its valid , HTMLescape it and print it # otherwise tell them they did bad :) } else { # ask them for theri name } definitely the better way to handle it, although you don't need the || unless you want a default value.

Re: What are the problems with my CGI script

2006-06-06 Thread JupiterHost.Net
Anthony Ettinger wrote: my $name = param('name') || ''; if(defined $name) { # if its valid , HTMLescape it and print it # otherwise tell them they did bad :) } else { # ask them for theri name } definitely the better way to handle it, although you don't need the || unles

Re: What are the problems with my CGI script

2006-06-06 Thread JupiterHost.Net
Hello, Use of uninitialized value in concatenation (.) or string at cgi_7.pl line 31. This is your name Use of uninitialized value in concatenation (.) or string at cgi_7.pl line 35. Line 31 and 35 are using data that in uninitialized. For instance calling param() on a parameter that has not

Re: problems with CGI and mod_perl

2006-06-06 Thread sfantar
sfantar a écrit : Hello everyone I have started since today learning how to write cgi in Perl with this doc : http://users.easystreet.com/ovid/cgi_course/lessons/lesson_one.html I am running ubuntu on my pc and I installed the package mod_perl made by ubuntu a few days ago and I was able to

Re: problems with CGI and mod_perl

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 19:17 +0200, sfantar wrote: > Hello everyone > > I have started since today learning how to write cgi in Perl with this > doc : http://users.easystreet.com/ovid/cgi_course/lessons/lesson_one.html > > I am running ubuntu on my pc and I installed the package mod_perl made >

Re: reading Perl syntax

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 12:14 -0500, [EMAIL PROTECTED] wrote: > I'm trying to debug a failing script. It is chock full of expressions > like this: > $self->_read_file($self->{file}) > > I have never used this syntax in my own scripts which are pretty basic > and getting a headache trying to figur

problems with CGI and mod_perl

2006-06-06 Thread sfantar
Hello everyone I have started since today learning how to write cgi in Perl with this doc : http://users.easystreet.com/ovid/cgi_course/lessons/lesson_one.html I am running ubuntu on my pc and I installed the package mod_perl made by ubuntu a few days ago and I was able to run Perl scripts f

reading Perl syntax

2006-06-06 Thread reader
I'm trying to debug a failing script. It is chock full of expressions like this: $self->_read_file($self->{file}) I have never used this syntax in my own scripts which are pretty basic and getting a headache trying to figure out what that line is saying. One of the @_ array being passed to th

Re: Multiple Page Scrape

2006-06-06 Thread Anthony Ettinger
Since it's native xml format, I would use XML::Simple to parse it into a hash, then you can format however you want by looping through the hash. On 6/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: The script below scrapes a House of Representatives vote page which is in xml and saves it in a

RE: template loop problem

2006-06-06 Thread Graeme McLaren
k got this one fixed too just needed to put a hashref inside a while loop. From: "Graeme McLaren" <[EMAIL PROTECTED]> To: beginners@perl.org Subject: template loop problem Date: Tue, 06 Jun 2006 16:06:47 +0100 MIME-Version: 1.0 X-Originating-IP: [62.254.183.162] X-Originating-Email:

Re: regex for date "dd-mmm-yy"

2006-06-06 Thread Dr.Ruud
Mark Martin schreef: > would anybody have to hand a regex for date "dd-mmm-yy". I want to be > able to validate dates that should be along the lines of : > > 06-jan-06 See Regexp::Common::time (yes, lowercase 't') http://search.cpan.org/search?module=Regexp::Common::time -- Affijn, Ruud "Gewoo

template loop problem

2006-06-06 Thread Graeme McLaren
Hi all, I'm getting this error when dying out a template loop array ref: Software error: $VAR1 = [ { 'team_name' => 'bla2', 'team_id' => 'test2' }, $VAR1->[0], $VAR1->[0] ]; push @team_array, \%team; the above error is when doing

Re: why this alarm can't work?

2006-06-06 Thread Tom Phoenix
On 6/6/06, Chas Owens <[EMAIL PROTECTED]> wrote: I used "unless" because flock returns 0 on success and -1 on failure (unless it doesn't work like C version). Nope; it works like Perl. :-) A true value for success, false for failure. Cheers! --Tom Phoenix Stonehenge Perl Training -- To uns

Re: why this alarm can't work?

2006-06-06 Thread Chas Owens
On 6/6/06, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 6/6/06, Chas Owens <[EMAIL PROTECTED]> wrote: > On 6/6/06, Jeff Pang <[EMAIL PROTECTED]> wrote: > You may want to use the non-blocking flock instead: > my $tries; > for $tries (0 .. $maxtries) { > break unless flock (SOCKLOCK,LOCK_EX | LOC

Re: why this alarm can't work?

2006-06-06 Thread Tom Phoenix
On 6/6/06, Chas Owens <[EMAIL PROTECTED]> wrote: On 6/6/06, Jeff Pang <[EMAIL PROTECTED]> wrote: You may want to use the non-blocking flock instead: my $tries; for $tries (0 .. $maxtries) { break unless flock (SOCKLOCK,LOCK_EX | LOCK_NB); } die "Could not get an exclusive lock: $!" if $tri

Multiple Page Scrape

2006-06-06 Thread kc68
The script below scrapes a House of Representatives vote page which is in xml and saves it in a spreadsheet which is best opened as an xls read only. How can I: 1) scrape multiple vote pages into individual spreadsheets with a single script? 2) Only scrape columns C, F, G, H in the resu

Re: why this alarm can't work?

2006-06-06 Thread Chas Owens
On 6/6/06, Jeff Pang <[EMAIL PROTECTED]> wrote: Hello,lists, See these code piece please: while ($cycles--) { my $c; eval { local $SIG{ALRM} = sub { die "flock timeout" }; alarm 3; open (SOCKLOCK,SOCK_LOCK) or die "open lock file fai

RE: What are the problems with my CGI script

2006-06-06 Thread Smith, Derek
>Dear Dr. Ruud, > >Thanks it works. I change this line into: > >my $name = ($query_obj->param('text_field') or ' '); >But I am not sure why I need to add the (or ''). I >see nowhere in CGI.pm talking about it. Can you >explain it in a liitle bit detail? Also what am I >supposed to do if

Re: how to update my @INC (can't find .pm's after upgrading perl)

2006-06-06 Thread Tom Phoenix
On 6/4/06, Harold Castro <[EMAIL PROTECTED]> wrote: I'm currently running perl-5.8.7, my modules are located in site_perl/5.8.7 however, after upgrading to 5.8.8, all of programs using perl modules, suddenly breaks because it cannot find those modules into its new supposed to be @INC (site_perl/

Re: What are the problems with my CGI script

2006-06-06 Thread chen li
--- "Dr.Ruud" <[EMAIL PROTECTED]> wrote: > chen li schreef: > > > my $name=$query_obj->param('text_field'); > > print $query_obj->p,"This is your name $name", > > "\n\n"; #line31 > > [...] > > Use of uninitialized value in concatenation (.) or > > string at cgi_7.pl line 31. > >my $name

Re: Newline error

2006-06-06 Thread Xavier Noria
On Jun 6, 2006, at 14:16, John W. Krahn wrote: Mr. Shawn H. Corey wrote: $output_file =~ s/\r//g; # chomp only removes linefeed characters \n # BTW, there is no such thing as a newline; # it is either a linefeed: \n ASCII LF 0x0A # or a carriage return: \r ASCII CR 0x0D "\n" is inherited fr

Re: Newline error

2006-06-06 Thread John W. Krahn
Mr. Shawn H. Corey wrote: > > $output_file =~ s/\r//g; > # chomp only removes linefeed characters \n > > # BTW, there is no such thing as a newline; > # it is either a linefeed: \n ASCII LF 0x0A > # or a carriage return: \r ASCII CR 0x0D "\n" is inherited from the C programming language and is t

Re: Newline error

2006-06-06 Thread Muma W.
joseph wrote: All, Just like to ask for correction on what's wrong with my script it gives spit out this error when i run it. Unsuccessful open on filename containing newline at disksize.pl line 8. Can't open file No such file or directory But it runs without this error whenever i feed it up

Re: Newline error

2006-06-06 Thread Mr. Shawn H. Corey
On Tue, 2006-06-06 at 18:59 +0800, joseph wrote: > All, > > Just like to ask for correction on what's wrong with my script it gives spit > out this error when i run it. > > Unsuccessful open on filename containing newline at disksize.pl line 8. > Can't open file No such file or directory > > Bu

Re: Newline error

2006-06-06 Thread John W. Krahn
joseph wrote: > All, Hello, > Just like to ask for correction on what's wrong with my script it gives spit > out this error when i run it. > > Unsuccessful open on filename containing newline at disksize.pl line 8. > Can't open file No such file or directory > > But it runs without this error

Re: Newline error

2006-06-06 Thread Xavier Noria
On Jun 6, 2006, at 12:59, joseph wrote: All, Just like to ask for correction on what's wrong with my script it gives spit out this error when i run it. Unsuccessful open on filename containing newline at disksize.pl line 8. Can't open file No such file or directory But it runs without th

Re: slurp from commandline?

2006-06-06 Thread John W. Krahn
Alan_C wrote: > On Tuesday 06 June 2006 01:13, John W. Krahn wrote: > [ few example commands ] >>>I'm accustomed to some of those. But how do I or is it possible to file >>>slurp on the command line, substituting \n+ with \n >>It is explained in the perlrun document for the -0 (zero) switch. >> >>

Re: regex for date "dd-mmm-yy"

2006-06-06 Thread Bjørge Solli
On Tuesday 06 June 2006 12:52, Mark Martin wrote: > Hi, > would anybody have to hand a regex for date "dd-mmm-yy". I want to be able > to validate dates that should be along the lines of : > > 06-jan-06 m/(0?[1-9]|[12]\d|3[01])-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov| dec)-(\d\d)/i Untested.

Newline error

2006-06-06 Thread joseph
All, Just like to ask for correction on what's wrong with my script it gives spit out this error when i run it. Unsuccessful open on filename containing newline at disksize.pl line 8. Can't open file No such file or directory But it runs without this error whenever i feed it up when an existing

RE: Checkbox form processing problem

2006-06-06 Thread Graeme McLaren
Hey all, got it fixed all I needed was an ORDER BY id ASC clause on my SQL - sorted. G :) From: "Graeme McLaren" <[EMAIL PROTECTED]> To: beginners@perl.org Subject: Checkbox form processing problem Date: Tue, 06 Jun 2006 09:23:48 +0100 MIME-Version: 1.0 X-Originating-IP: [62.254.1

regex for date "dd-mmm-yy"

2006-06-06 Thread Mark Martin
Hi, would anybody have to hand a regex for date "dd-mmm-yy". I want to be able to validate dates that should be along the lines of : 06-jan-06 Cheers. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: slurp from commandline?

2006-06-06 Thread Muma W.
Alan_C wrote: [...] perl -0777 -pne 's/\n+/\n/g' rsync_sl_log.txt > rsync_sl_log.txt.new ^^ 4th attempt. Bingo Works! Though I'm unsure if I'm attempting to mix shell and Perl there (bash shell redirection operator: > redirect STDOUT to a file) Though it works, does anyone have any

Re: Checkbox form processing problem

2006-06-06 Thread Muma W.
Graeme McLaren wrote: [...] It works but unfortunately it loses the order when checking one of the checkboxes. Can anyone suggest a way to generate a checkbox form and when updating the values it keeps the order? [...] I don't know if you can ensure the browser submits elements in a certain

Re: slurp from commandline?

2006-06-06 Thread Alan_C
On Tuesday 06 June 2006 01:13, John W. Krahn wrote: [ few example commands ] > > I'm accustomed to some of those. But how do I or is it possible to file > > slurp on the command line, substituting \n+ with \n > > It is explained in the perlrun document for the -0 (zero) switch. > > perldoc perlrun

Checkbox form processing problem

2006-06-06 Thread Graeme McLaren
Hi all, glad you seemed to like my "Public Sub House" routine - yes perhaps VB code ain't the best for a perl mailing list - hmmm. I got that port script working anyway, another pain in the ass job done. I was creating a checkbox form yesterday: bla1 name="team_name_1" checked> Newcastle

Re: slurp from commandline?

2006-06-06 Thread John W. Krahn
Alan_C wrote: > Hi, Hello, > perl -pi.bak -e 'tr/\xA0/ /' filenames* > > # all files in a folder > find . | xargs perl -p -i.bak -e 's/oldstring/newstring/g' > > perl -e 's/string/stringier/gi' -p -i.bak *.html > > I'm accustomed to some of those. But how do I or is it possible to file >

Re: What are the problems with my CGI script

2006-06-06 Thread Dr.Ruud
chen li schreef: > my $name=$query_obj->param('text_field'); > print $query_obj->p,"This is your name $name", > "\n\n"; #line31 > [...] > Use of uninitialized value in concatenation (.) or > string at cgi_7.pl line 31. my $name = ($query_obj->param('text_field') or 'Joe?'); -- Affijn, Ruu

slurp from commandline?

2006-06-06 Thread Alan_C
Hi, perl -pi.bak -e 'tr/\xA0/ /' filenames* # all files in a folder find . | xargs perl -p -i.bak -e 's/oldstring/newstring/g' perl -e 's/string/stringier/gi' -p -i.bak *.html I'm accustomed to some of those. But how do I or is it possible to file slurp on the command line, substituting \

why this alarm can't work?

2006-06-06 Thread Jeff Pang
Hello,lists, See these code piece please: while ($cycles--) { my $c; eval { local $SIG{ALRM} = sub { die "flock timeout" }; alarm 3; open (SOCKLOCK,SOCK_LOCK) or die "open lock file fail: $!"; flock (SOCKLOCK,LOCK_EX);