Re: perl reg. exp. (search and replace)

2008-11-03 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi all, Hello, I have a string which contains spaces. I need to replace those spaces with underscore, so I have written command like this $string="fsdfsdfsdf fsdfsdfsdf"; chomp($string1 = ($string =~ s/\s+$/_/g)); \s+$ matches one or more of any whitespace characte

Re: Reg : Browser Back Button

2008-11-03 Thread Rob Coops
On Mon, Nov 3, 2008 at 11:10 AM, Anusha Krishna chand < [EMAIL PROTECTED]> wrote: > Hi All, >Is it possible to perform some action when we click on back button > of the browser. I need to call a script when i click on back button of the > browser using perl script... > Is there any brows

Reg : Browser Back Button

2008-11-03 Thread Anusha Krishna chand
Hi All, Is it possible to perform some action when we click on back button of the browser. I need to call a script when i click on back button of the browser using perl script...

Odd problems with alarm()

2008-11-03 Thread Matthew Tice
I've setup a simple (well, I copied it from someone else and modified it) to monitor stale NFS mounts. Some preliminary testing seemed to go okay but this problem crept up on me this weekend. The script is as follows: #!/usr/bin/perl if (@ARGV < 1) { print "Usage:\n"; print "$0

debugger exiting

2008-11-03 Thread Sharan Basappa
Hi, I am using debugging for a program of mine. The debugger exits probably after a regex match fail. I am not sure why it should exit. Any ideas, clues? Regards main::(StTrAuto.pl:106): my @new_auto_tr = (); DB<2> s main::(StTrAuto.pl:107): foreach $temp (@auto_tr) main::(S

RE: Reg : Browser Back Button

2008-11-03 Thread Andrew Curry
Actually using javascript it is possible although probably not recommended and again can not be guaranteed to work on all browsers. -Original Message- From: Rob Coops [mailto:[EMAIL PROTECTED] Sent: 03 November 2008 10:42 To: beginners@perl.org Subject: Re: Reg : Browser Back Button On M

Re: Odd problems with alarm()

2008-11-03 Thread John W. Krahn
Matthew Tice wrote: I've setup a simple (well, I copied it from someone else and modified it) to monitor stale NFS mounts. Some preliminary testing seemed to go okay but this problem crept up on me this weekend. The script is as follows: #!/usr/bin/perl use warnings; use strict; if (@ARGV

Re: debugger exiting

2008-11-03 Thread John W. Krahn
Sharan Basappa wrote: Hi, Hello, I am using debugging for a program of mine. The debugger exits probably after a regex match fail. I am not sure why it should exit. Any ideas, clues? Regards main::(StTrAuto.pl:106): my @new_auto_tr = (); DB<2> s main::(StTrAuto.pl:107):

Re: Odd problems with alarm()

2008-11-03 Thread Dr.Ruud
"Matthew Tice" schreef: > eval { > local $SIG{ALRM} = sub {die "alarm\n"}; > alarm 2; > $test = `ls @ARGV[0]`; > alarm 0; > }; > > if ($@) { > die unless $@ eq "alarm\n"; > # Timed out - error > exit 1; > } else { > # Okay > exit 0; > } eval { local $SIG{ALRM} = sub {die

Re: debugger exiting

2008-11-03 Thread Rob Dixon
Sharan Basappa wrote: > > I am using debugging for a program of mine. > > The debugger exits probably after a regex match fail. I am not sure > why it should exit. > Any ideas, clues? > > Regards > > main::(StTrAuto.pl:106): my @new_auto_tr = (); > DB<2> s > main::(StTrAuto.pl:107):

Matching Weird Text Chars

2008-11-03 Thread Kent, Mr. John, Contractor, Code 7500
Dear Guru's I have some nautical word documents that have been converted to text, That I am parsing and converting to html. Everything is easy except for what happens to the degrees, Apostrophes and quote symbols In the text document they are written as Deg = ° Apostrophe (') = <92> Open quo

Re: Matching Weird Text Chars

2008-11-03 Thread Chas. Owens
On Mon, Nov 3, 2008 at 13:16, Kent, Mr. John, Contractor, Code 7500 <[EMAIL PROTECTED]> wrote: snip > In the text document they are written as > > Deg = ° > Apostrophe (') = <92> > Open quote (") = <93> > Closed quote (") = <94> snip How are you viewing the file? Most likely the <92> notation

Re: debugger exiting

2008-11-03 Thread Chas. Owens
On Mon, Nov 3, 2008 at 13:53, Rob Dixon <[EMAIL PROTECTED]> wrote: snip > I also think that you have not written > > use strict; > use warnings; > > at the start of your program, and anything that is presented to this list > should > at least have those in place. snip Just because I am in a gru

Re: debugger exiting

2008-11-03 Thread Rob Dixon
Chas. Owens wrote: > Rob Dixon wrote: >> >> I also think that you have not written >> >> use strict; >> use warnings; >> >> at the start of your program, and anything that is presented to this list >> should >> at least have those in place. > > Just because I am in a grumpy/contrary mood, I tak

Re: perl reg. exp. (search and replace)

2008-11-03 Thread Anirban Adhikary
use strict; use warnings; my $string="fsdfsdfsdf fsdfsdfsdf"; my ($a,$b)=split(/\s+/,$string); my $new_string=$a."_".$b; print $new_string."\n"; Regards Anirban Adhikary. On Mon, Nov 3, 2008 at 2:15 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >> Hi all, >> > > Hell