Re: [^/]* Is Not Working

2018-03-24 Thread Shlomi Fish
On Sun, 18 Mar 2018 12:32:44 +0100 hw wrote: > John SJ Anderson writes: > > >> But this one in its place does not work: > >> if ($link =~ m/\/([^/]*)$/) { # Oddly this does not work > > > > You still need to escape the `/` inside the character class. > > > > This works in my testing: `m/\/([^

Re: [^/]* Is Not Working

2018-03-23 Thread Mike Flannigan
Correction, I am now receiving the posts. Sorry. On 3/23/2018 8:12 PM, beginners-digest-h...@perl.org wrote: Thank you John Anderson and others. I see your answers in the archives, but for some reason I am not receiving the list postings anymore.  I am working to correct that. It appears th

Re: [^/]* Is Not Working

2018-03-23 Thread Mike Flannigan
Thank you John Anderson and others. I see your answers in the archives, but for some reason I am not receiving the list postings anymore.  I am working to correct that. It appears the last time I received a post was 3/17/2018. Mike On 3/17/2018 10:02 AM, Mike Flannigan wrote: This line wor

Re: [^/]* Is Not Working

2018-03-18 Thread hw
John SJ Anderson writes: >> But this one in its place does not work: >> if ($link =~ m/\/([^/]*)$/) { # Oddly this does not work > > You still need to escape the `/` inside the character class. > > This works in my testing: `m/\/([^\/]*)$/`. > > IMO this is a case where an alternative delimiter f

Re: [^/]* Is Not Working

2018-03-17 Thread John SJ Anderson
> But this one in its place does not work: > if ($link =~ m/\/([^/]*)$/) { # Oddly this does not work You still need to escape the `/` inside the character class. This works in my testing: `m/\/([^\/]*)$/`. IMO this is a case where an alternative delimiter for `m//` — such as the `#` in your

[^/]* Is Not Working

2018-03-17 Thread Mike Flannigan
This line works fine: if ($link =~ m#/([^/]*)$#) { But this one in its place does not work: if ($link =~ m/\/([^/]*)$/) { # Oddly this does not work Gives error: Unmatched [ in regex; marked by <-- HERE in m//([ <-- HERE ^/ at csvtopo24.pl line 74. I think it has to do with the "[^/]*". Any

Re: Substitution operator is not working in perl - Windows OS

2014-12-05 Thread Jitendra Barik
Hi Shawn, >> >> it is VERSION. This is the not a issue. s/\%VERSION\%/$version1/g; the >> correct one. >> >> If I changed VERSION to VERSIONABC it is working correctly OR if I add >> more character to VERSION then it is working. I could not understand why it &g

Re: Substitution operator is not working in perl - Windows OS

2014-12-05 Thread Adam Millerchip
OR if I add > more character to VERSION then it is working. I could not understand why it > is not working for me. > > The first place in the file is not changed but second occurrence it > has replaced the string. > > Please let me know oi there anything I need to verify? >

Re: Substitution operator is not working in perl - Windows OS

2014-12-04 Thread Jitendra Barik
Hi Shawn, it is VERSION. This is the not a issue. s/\%VERSION\%/$version1/g; the correct one. If I changed VERSION to VERSIONABC it is working correctly OR if I add more character to VERSION then it is working. I could not understand why it is not working for me. The first place in the file is

Re: Substitution operator is not working in perl - Windows OS

2014-12-04 Thread Shawn H Corey
On Thu, 4 Dec 2014 16:06:26 +0530 Jitendra Barik wrote: > My code is: > > $version1 = "JITENDRA"; > tie @array,Tie::File,"$rtf1" or die($!); > > for(@array){ > #print "Hi"; > s/\%VERSIONS\%/$version1/g; > > > } > untie(@array); > > FILE: > ***

Re: Substitution operator is not working in perl - Windows OS

2014-12-04 Thread Hans Ginzel
ther during OS setup or as an update -- > > REVISION HISTORY > > %VERSION% > > ************** > > In the above file, the first %VERSION% is not substitute but second one is repalced bt string JITENDRA. I am executing in windows OS. Could you please help me why it is not working. > > Regards, > Jitendra

Substitution operator is not working in perl - Windows OS

2014-12-04 Thread Jitendra Barik
ng JITENDRA. I am executing in windows OS. Could you please help me why it is not working. Regards, Jitendra

Re: Suddenly this script is not working!

2014-07-30 Thread Jim Gibson
On Jul 29, 2014, at 11:00 PM, ESChamp wrote: > Jim Gibson wrote on 7/29/2014 10:08 PM: >>> > >> This is all speculation because you have not provided us with your exact >> program and data files. > > I was warned not to post a 3000 line data file and a 150 line program, > but if you'd like me

Re: Suddenly this script is not working!

2014-07-30 Thread David Precious
On Wed, 30 Jul 2014 11:55:46 -0400 ESChamp wrote: > Robert Wohlfarth wrote on 7/30/2014 10:31 AM: > > On Wed, Jul 30, 2014 at 1:00 AM, ESChamp > > wrote: > > > > 0D 0A 3C 70 72 65 3E 0D 0A > > > > so no invisible characters. > > > > > Or maybe occurs on

Re: Suddenly this script is not working!

2014-07-30 Thread ESChamp
Robert Wohlfarth wrote on 7/30/2014 10:31 AM: > On Wed, Jul 30, 2014 at 1:00 AM, ESChamp > wrote: > > 0D 0A 3C 70 72 65 3E 0D 0A > > so no invisible characters. > > > Or maybe occurs on the first line, in which case $index will have > the value 0, which i

Re: Suddenly this script is not working!

2014-07-30 Thread Robert Wohlfarth
On Wed, Jul 30, 2014 at 1:00 AM, ESChamp wrote: > 0D 0A 3C 70 72 65 3E 0D 0A > > so no invisible characters. > > > Or maybe occurs on the first line, in which case $index will have > the value 0, which is treated as false, and your program will die. > > is line 709. No other line is simply H

Re: Suddenly this script is not working!

2014-07-29 Thread ESChamp
Jim Gibson wrote on 7/29/2014 10:08 PM: > > On Jul 29, 2014, at 5:12 PM, ESChamp wrote: > >> ESChamp wrote on 7/28/2014 6:59 PM: >> >> Let me backtrack and provide some background information. >> >> This script processes two files, recapfile, a plain text file, and copy, >> and HTML-formatted

Re: Suddenly this script is not working!

2014-07-29 Thread Jim Gibson
On Jul 29, 2014, at 5:12 PM, ESChamp wrote: > ESChamp wrote on 7/28/2014 6:59 PM: >> Suddenly, without warning or error messages, the script below is >> producing null for values of $hfile and $bfile! >> >> The script begins: >> >> > > Let me backtrack and provide some background information

Re: Suddenly this script is not working!

2014-07-29 Thread ESChamp
ESChamp wrote on 7/28/2014 6:59 PM: > Suddenly, without warning or error messages, the script below is > producing null for values of $hfile and $bfile! > > The script begins: > > #!/usr/bin/perl > > use Tie::File; > use File::Copy 'copy'; > use File::Spec; > > > and further down, it has: > >

Re: Suddenly this script is not working!

2014-07-29 Thread Kent Fredric
The script begins: > > #!/usr/bin/perl > > use Tie::File; > use File::Copy 'copy'; > use File::Spec; > > I think this problem becomes much clearer if you enable strict. -- [ A.pl ] --- my @list = qw( a b c ); print "X $list Y"; -- [ A.pl output ] -- X Y -- [ B.pl ] -- use strict; my @list =

Re: Suddenly this script is not working!

2014-07-29 Thread Jim Gibson
On Jul 28, 2014, at 3:59 PM, ESChamp wrote: > Suddenly, without warning or error messages, the script below is > producing null for values of $hfile and $bfile! What are $hfile and $bfile? You don’t show them in your script. You show two arrays: @hfile and @bfile, but those are not the same as

Re: Suddenly this script is not working!

2014-07-29 Thread David Precious
On Mon, 28 Jul 2014 20:48:51 -0400 Shawn H Corey wrote: > > copy $htmfile, $copy; > > # always check for error > copy $htmfile, $copy or die "could not copy $htmlfile\n"; And even more helpfully, include in the message $! - which will contain the error message to show you what actually went w

Re: Suddenly this script is not working!

2014-07-28 Thread Shawn H Corey
On Mon, 28 Jul 2014 18:59:47 -0400 ESChamp wrote: > # Tie it to an array > # > (my $copy = $htmfile) =~ s/(\.htm)\z/-Copy$1/i; # the substitution will fail if the HTML file # doesn't have the correct extension die "invalid extension on $htmlfile\n" if $copy eq $htmlfile; > copy $htmfile, $copy;

Suddenly this script is not working!

2014-07-28 Thread ESChamp
Suddenly, without warning or error messages, the script below is producing null for values of $hfile and $bfile! The script begins: #!/usr/bin/perl use Tie::File; use File::Copy 'copy'; use File::Spec; and further down, it has: # Tie it to an array # (my $copy = $htmfile) =~ s/(\.htm)\z/-Copy

Re: -e switch is not working on Window 7 and 8

2014-07-21 Thread Purvee Vora
wolf > > > On 21 July 2014 07:24, Purvee Vora wrote: > >> Hi All, >> >> I am currently learing perl and was trying command line switches but It >> is not working in window7 and 8. >> >> Can any one help me out about this. >> >> I am real

Re: -e switch is not working on Window 7 and 8

2014-07-20 Thread Shaji Kalidasan
2014 at 10:54 AM, Purvee Vora wrote: > Hi All, > > I am currently learing perl and was trying command line switches but It is > not working in window7 and 8. > > Can any one help me out about this. > > I am really stuck here. > > I tried following example: > > pe

Re: -e switch is not working on Window 7 and 8

2014-07-20 Thread WFB
Hi Purvee, perl -e 'xyz' works fine on Unix, however on Windows you must use " instead. perl -e "print qq(Hello \n)" greetings, wolf On 21 July 2014 07:24, Purvee Vora wrote: > Hi All, > > I am currently learing perl and was trying command line switches

-e switch is not working on Window 7 and 8

2014-07-20 Thread Purvee Vora
Hi All, I am currently learing perl and was trying command line switches but It is not working in window7 and 8. Can any one help me out about this. I am really stuck here. I tried following example: perl -e 'print "Hello \n";' Commnad line shows blank response. I cannot

Re: auto completion by crtl + space is not working with eclipse -epic module , Good IDE for beginner

2014-07-15 Thread Benjamin Fernandis
> > $smtp = Net::SMTP->new(.); > $smtp->[content assist] > > > > On Tue, Jul 15, 2014 at 1:11 PM, Benjamin Fernandis > wrote: > >> Hi, >> >> I installed Ecplise standard version but auto completion of syntax is not >> working whil

Re: auto completion by crtl + space is not working with eclipse -epic module , Good IDE for beginner

2014-07-15 Thread Shaji Kalidasan
stalled Ecplise standard version but auto completion of syntax is not > working while pressing CTL + SPACE key. > > Is there any configuration required for this ? Any other good

auto completion by crtl + space is not working with eclipse -epic module , Good IDE for beginner

2014-07-15 Thread Benjamin Fernandis
Hi, I installed Ecplise standard version but auto completion of syntax is not working while pressing CTL + SPACE key. Is there any configuration required for this ? Any other good IDE for beginner ? Thx

Re: Solved mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-31 Thread Jan Gruber
Hi Martin, > I feel embarrassed for wasting everybody's time, but I > really appreciate the help. sometimes one needs to think out loud to solve a problem. I had a lot of problems like this one where it helped to get feedback from this list. Regards, Jan -- Paranoia is simply an optimist

Re: Solved mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-31 Thread Jan Gruber
Hi Martin, > I feel embarrassed for wasting everybody's time, but I > really appreciate the help. sometimes one needs to think out loud to solve a problem. I had a lot of problems like this one where it helped to get feedback from this list. Regards, Jan -- Paranoia is simply an optimis

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Shawn H Corey
On Thu, 30 Jan 2014 07:47:29 -0600 "Martin G. McCormick" wrote: > David Precious writes: > > change "system" to "print" to print out the command that would be > > run, > > Great suggestion! I actually did try that using echo instead of > print so that system was still involved and the values w

Solved mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
This is a classic example of the admonition, "Never trust data." I did try the following: David Precious writes: > change "system" to "print" to print out the command that would be run, > and (a) you'll likely see the problem, or (b) you can try running that > exact command.

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
"Ron Bergin" writes: > As has already been mentioned, part of the problem is your quoting. > > What is the value of $directories and more specifically, does it end with > a forward slash? Personally, I prefer to leave off the trailing dir > separator because IMO it makes it more clear later when

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
David Precious writes: > change "system" to "print" to print out the command that would be run, Great suggestion! I actually did try that using echo instead of print so that system was still involved and the values were correct. It looked beautiful. > and (a) you'll likely see the problem, or (b)

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Ron Bergin
Martin G. McCormick wrote: > I have a perl script that I run as root which needs to > move a file from where it is to another directory. > > I keep getting the "Usage" help message and a > permission denied. If I su to root and manually make the move, > it works. > > The perl scr

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Charles DeRykus
On Wed, Jan 29, 2014 at 2:10 PM, Martin G. McCormick < mar...@server1.shellworld.net> wrote: > I have a perl script that I run as root which needs to > move a file from where it is to another directory. > > I keep getting the "Usage" help message and a > permission denied. If I su

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Hal Wigoda
Is the directory you are moving to writable? Sent from my iPad > On Jan 29, 2014, at 4:10 PM, "Martin G. McCormick" > wrote: > >I have a perl script that I run as root which needs to > move a file from where it is to another directory. > >I keep getting the "Usage" help message and a

Re: mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread David Precious
On Wed, 29 Jan 2014 16:10:25 -0600 "Martin G. McCormick" wrote: > I keep getting the "Usage" help message and a > permission denied. If I su to root and manually make the move, > it works. change "system" to "print" to print out the command that would be run, and (a) you'll likely see the

mv Is Not Working the Same Way Under System as Under a Shell.

2014-01-30 Thread Martin G. McCormick
I have a perl script that I run as root which needs to move a file from where it is to another directory. I keep getting the "Usage" help message and a permission denied. If I su to root and manually make the move, it works. The perl script is not trying to run suid to ro

Re: why this is not working ??

2003-08-28 Thread John W. Krahn
Jeff Westman wrote: > > --- "John W. Krahn" <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > > > > open(STATUS,">>status.txt");for($i=0;$i<=98985;$i++){system("process");if(($i%10)==0){print(STATUS"\n\n > > $i iterations over !!*\n\n")}}close(STATUS); > > > > However that is

Re: why this is not working ??

2003-08-28 Thread Jeff Westman
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > On Wed, Aug 27, 2003 at 11:18:26AM +0530, T.S.Ravi Shankar wrote: > > > > > > open(STATUS,">> status.txt"); > > > for ($i=0; $i<=98985;$i++) { > > > system ("process"); > > > if (($i%10)==0) > > > { print ST

Re: why this is not working ??

2003-08-28 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > On Wed, Aug 27, 2003 at 11:18:26AM +0530, T.S.Ravi Shankar wrote: > > > > open(STATUS,">> status.txt"); > > for ($i=0; $i<=98985;$i++) { > > system ("process"); > > if (($i%10)==0) > > { print STATUS "\n\n $i iterations over !!*\n\n"; } > > } > > clo

Re: why this is not working ??

2003-08-28 Thread jqdkf
On Wed, Aug 27, 2003 at 11:18:26AM +0530, T.S.Ravi Shankar wrote: > --- > > open(STATUS,">> status.txt"); > for ($i=0; $i<=98985;$i++) { > system ("process"); > if (($i%10)==0) > { print STATUS "\n\n $i iterations over !!*\n\n"; } > } > close(STATUS); > > -

Re: why this is not working ??

2003-08-27 Thread zentara
On Wed, 27 Aug 2003 11:18:26 +0530, [EMAIL PROTECTED] (T.S.Ravi Shankar) wrote: > >open(STATUS,">> status.txt"); >for ($i=0; $i<=98985;$i++) { > system ("process"); > if (($i%10)==0) >{ print STATUS "\n\n $i iterations over !!*\n\n"; } > } >close(STATUS); > >- >

Re: why this is not working ??

2003-08-27 Thread simran
Buffering is probably the reason why the file is not written till later. Try putting the following (from memory); - use FileHandle; open (STATUS, ">> status.txt") || die; STATUS->autoflush(1); -- On Wed, 2

why this is not working ??

2003-08-27 Thread T.S.Ravi Shankar
Hi all : I am running a process "n" number of times with a for loop. I am interested in looking for the status at specific intervals(say at every 10 iterations). I wrote the below shown code for this purpose but without success : --- open(STATUS,">> status.txt"); for ($i=0; $i<