Re: CPAN not working, or is it?

2019-03-12 Thread Gary Stainburn
On Tuesday 12 March 2019 06:16:59 Magnus Woldrich wrote: > $ perl -E 'say for @INC' > $ echo $PERL5LIB > # echo $PERL5LIB > > I'd suggest to set the PERL5LIB environment variable in your shell > config to something like ~/lib/perl5/. > > If you need the modules to be available globally and not o

Re: CPAN not working, or is it?

2019-03-12 Thread Magnus Woldrich
On Mar 11, Gary Stainburn (Gary Stainburn) wrote: I started off as always by using RPM's for everything I possibly can. I then started to use CPAN for everything else. You should use cpan(m) for everything. That way all modules will be up to date and they will be installed into the same

Re: CPAN not working, or is it?

2019-03-11 Thread Bruce Ferrell
Gary What often happens when you have "larger" modules, they reply on libraries.  To build the perl module from source, you need to devel rpm of the library installed to link against. example libxml2-2.7.6-21.el6_8.1.x86_64 libxml2-devel-2.7.6-21.el6_8.1.x86_64 XML::Simple won't build unless

Re: CPAN not working, or is it?

2019-03-11 Thread Mike Flannigan
I wanted you to know that we are out here, but just unable to help you. I doubt this old post will help you any: https://centosfaq.org/centos/perl-on-centos-6-and-centos-7/ Mike On 3/11/2019 8:55 AM, Gary Stainburn wrote: I'm replacing a dead F19 box with a new C7 one and I'm trying to get

CPAN not working, or is it?

2019-03-11 Thread Gary Stainburn
I'm replacing a dead F19 box with a new C7 one and I'm trying to get my Perl install completed. Ultimately, I need to get Selenium::Remote::Driver working, but I'm struggling before that. I started off as always by using RPM's for everything I possibly can. I then started to use CPAN for every

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: windows directory path not working in perl

2016-03-02 Thread Ken Slater
On Wed, Mar 2, 2016 at 5:40 AM, Arghya Das wrote: > #copies 1 file to another > > use warnings; > > use File::Copy; > > copy("FILE1.txt","new_file.txt"); > > > > This script works if FILE1.txt is in current directory of windows but when > i try to give a full path to a file like : "C:\Folder1\FIL

windows directory path not working in perl

2016-03-02 Thread Arghya Das
#copies 1 file to another use warnings; use File::Copy; copy("FILE1.txt","new_file.txt"); This script works if FILE1.txt is in current directory of windows but when i try to give a full path to a file like : "C:\Folder1\FILE1.txt" it doesnt work. This is the same with rename and unlink funct

XML Sructure creation not working

2015-11-20 Thread Punit Jain
Hi, I am facing an issue with my script while creating a XML . Below is required structure :- xyz true Distri 123 However I am getting below o/p xyz true Distri 123 My current code is :- #!/usr/bin/perl

Re: Not working example - from Mastering Perl book

2015-05-03 Thread Octavian Rasnita
Hi Andrew, Thank you for the correction. It looks it was a bug in book. I am interested only for curiosity. Hope I don't need to work with the symbol table and typeglobs. :-) - Original Message - I did this on my v5.14.2 and got the same result, so I resorted to reading $

Re: Not working example - from Mastering Perl book

2015-05-03 Thread Andrew Solomon
I did this on my v5.14.2 and got the same result, so I resorted to reading $ perldoc perlmod (it's rather long so search for "PACKAGE") A minor modification has the desired result: #!/usr/bin/perl # typeglob-name-package.pl use v5.10; my $foo = "Some value"; my $bar = "Another value"; who_am

Re: Not working example - from Mastering Perl book

2015-05-03 Thread Vincent Lequertier
Same output here, with perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-linux-thread-multi. I'm from package main My name is glob I'm from package main My name is glob Le 03/05/2015 10:01, Octavian Rasnita a écrit : > Hello, > > I've seen the following example in Mastering Perl book,

Not working example - from Mastering Perl book

2015-05-03 Thread Octavian Rasnita
Hello, I've seen the following example in Mastering Perl book, with the comment at the end telling what should be the result: #!/usr/bin/perl # typeglob-name-package.pl use v5.10; $foo = "Some value"; $bar = "Another value"; who_am_i( *foo ); who_am_i( *bar ); sub who_am_i { local *glob = s

Re: simple module install via CPAN not working.

2015-02-17 Thread Brandon McCaig
Gary; On Mon, Feb 16, 2015 at 8:45 AM, Gary Stainburn wrote: > I'm still looking to get WWW::Mechanize::Firefox installed. It > looks like I've got a more pressing issue. Even simple module > installs aren't working properly. I'm working through the > dependancy list and looking at Test::Tester a

simple module install via CPAN not working.

2015-02-16 Thread Gary Stainburn
I'm still looking to get WWW::Mechanize::Firefox installed. It looks like I've got a more pressing issue. Even simple module installs aren't working properly. I'm working through the dependancy list and looking at Test::Tester and Test::NoWarnings. Installing Test::Tester worked fine, but when

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
Hi, I read document and tried to test by typing trigger characters ":" and ">" also by CTRL - SPACE. but not working. Is there anything else require to install on top of elipse + perl plugin. As my current system has centos 7 + fresh perl install + eclipse + perl plugi

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: List::MoreUtils with array of arrays not working

2014-07-10 Thread Jim Gibson
On Jul 10, 2014, at 11:50 AM, Natxo Asenjo wrote: > On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson wrote: > > On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote: > > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson wrote: > > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote: > > In order to use the hash m

Re: List::MoreUtils with array of arrays not working

2014-07-10 Thread Natxo Asenjo
On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson wrote: > > On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote: > > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson > wrote: > > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote: > > In order to use the hash method of determining uniqueness, you must > convert

Re: List::MoreUtils with array of arrays not working

2014-07-09 Thread Jim Gibson
On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote: > > > > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson wrote: > > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote: > > > hi, > > > > i have an array of arrays which contains equal elements. I would like to > > isolate the unique values. > > Do y

Re: List::MoreUtils with array of arrays not working

2014-07-09 Thread Natxo Asenjo
On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson wrote: > > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote: > > > hi, > > > > i have an array of arrays which contains equal elements. I would like to > isolate the unique values. > > Do you mean that the subarrays contain equal NUMBERS of elements? ye

Re: List::MoreUtils with array of arrays not working

2014-07-09 Thread Jim Gibson
On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote: > hi, > > i have an array of arrays which contains equal elements. I would like to > isolate the unique values. Do you mean that the subarrays contain equal NUMBERS of elements? > > I have tried using the uniq method of List::MoreUtils but it

List::MoreUtils with array of arrays not working

2014-07-09 Thread Natxo Asenjo
hi, i have an array of arrays which contains equal elements. I would like to isolate the unique values. I have tried using the uniq method of List::MoreUtils but it apparently does not work with an AoA. This is what I tried: for my $i ( @$data_ref ) { push $seen_ref, [ $i->{'value1'}, $i->

Re: Match Variables Not Working in m//

2014-03-19 Thread Robert Wohlfarth
On Wed, Mar 19, 2014 at 1:49 PM, Thomas H. George wrote: > $_ = " H K53deloresg Bills Hank99 > Pellinor"; > if (/\s*(\w+)\s*(\w+)\*(\w+)\s*(\w+)\s*(\w+)\s*(\w+)/i) { > This pattern is missing the "\s" after the second (\w+). The "\*" matches a literal as

Re: Match Variables Not Working in m//

2014-03-19 Thread Shawn H Corey
On Wed, 19 Mar 2014 14:49:32 -0400 "Thomas H. George" wrote: > if (/\s*(\w+)\s*(\w+)\*(\w+)\s*(\w+)\s*(\w+)\s*(\w+)/i) { > $dud1 = $1; > $dud2 = $2; > $w_player = $3; > $n_player = $4; > $e_player = $5; > $s_player = $6; > } How about: ( $dud1, $dud2, $w_play

Re: Match Variables Not Working in m//

2014-03-19 Thread Andy Bach
On Wed, Mar 19, 2014 at 1:49 PM, Thomas H. George wrote: > Here is the code that is not working > The code you sent was missing an 's' in the RE. It also has no print stmt - trying: #!/usr/bin/perl use diagnostics; use strict; #... my $dud1 = "dud1"; my $dud2 = &quo

Match Variables Not Working in m//

2014-03-19 Thread Thomas H. George
Here is the code that is not working #!/usr/bin/perl use diagnostics; use strict; ... my $dud1 = "dud1"; my $dud2 = "dud2"; my $w_player = "?"; my $n_player = "?"; my $e_player = "?"; my $s_player = "?"; # $_ = $Board_1

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: Regex not working correctly

2013-12-11 Thread punit jain
That answers my question. Thanks Robert

Re: Regex not working correctly

2013-12-11 Thread Robert Wohlfarth
On Wed, Dec 11, 2013 at 10:35 AM, punit jain wrote: > > Thanks Shlomi, thats a good idea. However at the same time I was trying to > understand if something is wrong in my regex. Why would $2 capture the > number as I have used :- > > (?:(91\d{10}|0\d{10}|[7-9]\d{9}|0\d{11})|(?:(?:ph|cal)(\d+))) >

RE: Regex not working correctly

2013-12-11 Thread vijaya R
Hi, You can try the below pattern. if($line=~/([0-9]{3,})/gs) { print $1; } Thanks, Vijaya -- From: punit jain Sent: 12/11/2013 9:07 PM To: beginners@perl.org Subject: Regex not working correctly Hi, I have a requirement where I need to capture phone

Re: Regex not working correctly

2013-12-11 Thread punit jain
Thanks Shlomi, thats a good idea. However at the same time I was trying to understand if something is wrong in my regex. Why would $2 capture the number as I have used :- (?:(91\d{10}|0\d{10}|[7-9]\d{9}|0\d{11})|(?:(?:ph|cal)(\d+))) This would in my understanding match either number with regex 91

Re: Regex not working correctly

2013-12-11 Thread Jim Gibson
On Dec 11, 2013, at 7:34 AM, punit jain wrote: > Hi, > > I have a requirement where I need to capture phone number from different > strings. > > The strings could be :- > > > 1. COMP TEL NO 919369721113 for computer science > > 2. For Best Discount reach 092108493, from 6-9 > > 3. Your b

Re: Regex not working correctly

2013-12-11 Thread Shlomi Fish
Hi punit, On Wed, 11 Dec 2013 21:04:39 +0530 punit jain wrote: > Hi, > > I have a requirement where I need to capture phone number from different > strings. > > The strings could be :- > > > 1. COMP TEL NO 919369721113 for computer science > > 2. For Best Discount reach 092108493, from 6-9

Regex not working correctly

2013-12-11 Thread punit jain
Hi, I have a requirement where I need to capture phone number from different strings. The strings could be :- 1. COMP TEL NO 919369721113 for computer science 2. For Best Discount reach 092108493, from 6-9 3. Your booking Confirmed, 9210833321 4. price for free consultation call92504060 5.

Re: DateTime::Format::MySQL not working as expected, throwing error

2013-09-04 Thread Dr.Ruud
On 05/09/2013 02:28, J M wrote: However, I'm running into a problem: the FIRST instance of DateTime::Format::MySQL works perfectly... but when I get to the second one, it throws me this error: Use of uninitialized value $input in concatenation (.) or string at /usr/local/share/perl/5.14.2/ Date

DateTime::Format::MySQL not working as expected, throwing error

2013-09-04 Thread J M
Hi! I'm writing a simple script to output data from a MySQL database... Eventually I'd like to pipe it all into a .tex file and make a custom pdf out of it. However, I'm running into a problem: the FIRST instance of DateTime::Format::MySQL works perfectly... but when I get to the second one, it t

Re: Catfile function not working on windows 7 machine

2012-09-01 Thread Dr.Ruud
On 2012-08-08 12:17, Sandip Karale wrote: use File::Spec::Functions; my $f="foo.txt"; my $d="machdir"; Try: my $d = '//mach/dir'; print "$f \n"; print "$d \n"; print catfile($d,$f); -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands

Re: Catfile function not working on windows 7 machine

2012-08-09 Thread Paul Anderson
Per the message by Mr. Adigun, using a single quote instead of double quotes tells perl not to interpolate the string. That will prevent it from eating all those backslashes. Paul Anderson -- VE3HOP On 2012-08-09, at 8:53 AM, Sandip Karale wrote: > Hi Shlomi, > > Thanks for your re

Re: Catfile function not working on windows 7 machine

2012-08-09 Thread Sandip Karale
Hi Shlomi, Thanks for your reply. my $d="machdir"; This UNC path I'm getting from arguments, and then I want to process it. That is I want to concatenate the file name to it and open the file and print its contents. So your solution will not help. Sincerely, Sandip On Wed, Aug 8,

Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
On Thu, 9 Aug 2012 12:20:33 + Bob McConnell wrote: > My first step would be to log into the problem machine as the same > user the command runs under, then try to run it manually. The error > messages there should point you toward the problem. If it runs, then > there has to be a difference i

RE: system command not working in different versions

2012-08-09 Thread Bob McConnell
> From: Shawn H Corey > > On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) > venki neeli wrote: > > > What may be the problem? is it with version of perl? or perl module > > problem? > > It may be a difference in the shell. When there are metacharacters > present, system uses sh(1) to interpret them. Tr

Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) venki neeli wrote: > What may be the problem? is it with version of perl? or perl module > problem? It may be a difference in the shell. When there are metacharacters present, system uses sh(1) to interpret them. Try this on your machines to see if they're

Re: system command not working in different versions

2012-08-09 Thread Paul Anderson
> > From: midhun > To: Hal Wigoda > Cc: venki neeli ; perl list > Sent: Thursday, 9 August 2012 12:01 PM > Subject: Re: system command not working in different versions > > Neeli, Hal is right. Try $which perl from your shell. The location

Re: system command not working in different versions

2012-08-09 Thread venki neeli
roblem? is it with version of perl? or perl module problem? Regards, Neeli From: midhun To: Hal Wigoda Cc: venki neeli ; perl list Sent: Thursday, 9 August 2012 12:01 PM Subject: Re: system command not working in different versions Neeli, Hal is right.

Re: system command not working in different versions

2012-08-08 Thread midhun
> > > > > From: midhun > > To: venki neeli > > Cc: perl list > > Sent: Wednesday, 8 August 2012 3:55 PM > > Subject: Re: system command not working in different versions > > > > One suggestion. Did you compare

Re: system command not working in different versions

2012-08-08 Thread Hal Wigoda
ow.pl) are in same location. > > Regards, > Neeli > > > > From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did

Re: system command not working in different versions

2012-08-08 Thread Owen
> From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did you compare the shebang line of your submit_now.pl > and > your perl executable loca

Re: system command not working in different versions

2012-08-08 Thread venki neeli
August 2012 3:55 PM Subject: Re: system command not working in different versions One suggestion. Did you compare the shebang line of your submit_now.pl and your perl executable location in the 2nd machine where it is not working. Regards, Midhun On Wed, Aug 8, 2012 at 11:48 AM, venki neeli

Re: Catfile function not working on windows 7 machine

2012-08-08 Thread timothy adigun
Hi, Please, check my comments below On 8/8/12, Sandip Karale wrote: > Hello , > > I'm new to perl. > > I am on windows 7 64 bit machine. with Strawberry Perl (64-bit) 5.14.2.1. > > *My Code:* > > use File::Spec::Functions; > my $f="foo.txt"; > my $d="machdir"; > Instead of the above,

Re: system command not working in different versions

2012-08-08 Thread Shawn H Corey
On Wed, 8 Aug 2012 15:55:34 +0530 midhun wrote: > One suggestion. Did you compare the shebang line of your > submit_now.pl and your perl executable location in the 2nd machine > where it is not working. > > Regards, > Midhun > > On Wed, Aug 8, 2012 at 11:48 AM, venki ne

Re: Catfile function not working on windows 7 machine

2012-08-08 Thread Shlomi Fish
Hi Sandip, On Wed, 8 Aug 2012 15:47:24 +0530 Sandip Karale wrote: > Hello , > > I'm new to perl. > > I am on windows 7 64 bit machine. with Strawberry Perl (64-bit) > 5.14.2.1. It's good that you are using Strawberry Perl. > > *My Code:* > > use File::Spec::Functions; > my $f="foo.txt"; >

Re: system command not working in different versions

2012-08-08 Thread midhun
One suggestion. Did you compare the shebang line of your submit_now.pl and your perl executable location in the 2nd machine where it is not working. Regards, Midhun On Wed, Aug 8, 2012 at 11:48 AM, venki neeli wrote: > Dear Friends, > > I am developing a script in which I need to cal

Catfile function not working on windows 7 machine

2012-08-08 Thread Sandip Karale
Hello , I'm new to perl. I am on windows 7 64 bit machine. with Strawberry Perl (64-bit) 5.14.2.1. *My Code:* use File::Spec::Functions; my $f="foo.txt"; my $d="machdir"; print "$f \n"; print "$d \n"; print catfile($d,$f); *Output:* * * foo.txt mach\\dir \mach\dir\foo.txt *M

Re: system command not working in different versions

2012-08-07 Thread Jeff Pang
You might want to tell us what's the output for error. Some reasons include the file path, the permissions etc. I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./sub

system command not working in different versions

2012-08-07 Thread venki neeli
Dear Friends, I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./submit_now.pl $"); can you please, tell me what is the reason? and as well solution. Regards, Neeli

Re: WWW::Selenium click not working

2012-04-12 Thread cvega
On Thursday, April 5, 2012 4:21:44 AM UTC-7, Gary Stainburn wrote: > Hi folks. > > Returning to Perl on Win32 for the first time in ages. Installed Strawberry > Perl and WWW::Selenium. However, when I run the example in the CPAN help > page, it hangs because the $sel->click doesn't work. > > I

Re: Using the ternary operator to concat a string not working like I think?

2012-04-07 Thread Uri Guttman
On 04/07/2012 06:54 AM, Peter Scott wrote: On Wed, 04 Apr 2012 03:04:42 -0400, Uri Guttman wrote: that code is not a good use of ?: at all so use if/else. Right. And if you want the single statement succinctness, use and/or: % perl -le '%test = qw(one first two second); $test{one} eq "firs

Re: Using the ternary operator to concat a string not working like I think?

2012-04-07 Thread Peter Scott
On Wed, 04 Apr 2012 03:04:42 -0400, Uri Guttman wrote: > On 04/03/2012 06:55 PM, timothy adigun wrote: > that is the wrong way to fix this even if it works. > > the ternary operator is meant to return a single value from a choice of > two expressions. it is not meant for side effects like assignme

Re: Using the ternary operator to concat a string not working like I think?

2012-04-05 Thread Stan
Thanks to everyone for their help! It's been very enlightening! Stan On Apr 4, 2012, at 4:51 AM, Shlomi Fish wrote: > Hi all, > > inspired by this thread, I’ve added this item in my “Perl Elements to Avoid” > page: > > http://perl-begin.org/tutorials/bad-elements/#ternary_operator_instead_of_i

Re: WWW::Selenium click not working - CPAN install problem

2012-04-05 Thread Owen
> Just tried installing on a Linux box, but the CPAN install failed. > This > reminded me that I had to force the install on the WinXP machine to > get that > to install as the same test failed on that too. > > Here is the log from the Linux install. > > 'YAML' not installed, will not store persi

RE: WWW::Selenium click not working - CPAN install problem

2012-04-05 Thread Bob McConnell
> From: Gary Stainburn It has been a while since I last worked with Selenium, but when I installed Se1 I found the PM file on CPAN was not being kept up to date. I had to replace it with a newer version from the Selenium download site. In the time I spent working with it, I got the distinct imp

  1   2   3   4   >