Re: trouble

2019-07-04 Thread Andrew Solomon
Hi Mike, The email header tells me this was sent a week ago :-) Has this been resolved? Andrew On Thu, Jul 4, 2019 at 3:21 AM Mike Flannigan wrote: > > I am having trouble posting to the Beginners > Perl list. Is there a problem? > > > I understand that to upload a module to CPAN is need > to

Re: trouble derefencing

2011-10-08 Thread Shawn H Corey
On 11-10-08 02:37 PM, Natxo Asenjo wrote: hi, I need to add a cli option to my script to push multiple values in a hash. I have verified that using Getopt::Long this is possible, but cannot get my head around dereferencing it. This is a sample code:

Re: trouble derefencing

2011-10-08 Thread John SJ Anderson
On Sat, Oct 8, 2011 at 14:37, Natxo Asenjo wrote: > hi, > > I need to add a cli option to my script to push multiple values in a > hash. I have verified that using Getopt::Long this is possible, but > cannot get my head around dereferencing it. [ snip ] > when I run this I get: > ./kk.pl -e test=1

Re: Trouble building File::BSDGlob.pm

2011-06-13 Thread Robi
2 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Trouble building File::BSDGlob.pm

2011-06-13 Thread Robi
Dear Shlomi Fish, Thank you for the answer. I tried to use File::Glob's bsd_glob. I replaced line use File::BSDGlob ':glob'; with use File::Glob ':glob'; @list = bsd_glob('*.[ch]'); Now I receive the following error: Global symbol "@list" requires explicit package name at /big1/robi/ Experime

Re: Trouble building File::BSDGlob.pm

2011-06-01 Thread Shlomi Fish
Hi Robi, On Tuesday 31 May 2011 13:08:27 Robi wrote: > I'm not a perl guy but I need to make something run that relies on the > BSDGlob.pm module. I downloaded xzvf File-BSDGlob-0.94.tar.gz from > CPAN and generated the Makefile. The make dies with > > bash-3.2$ perl Makefile.PL > Checking if yo

Re: trouble matching words with parentheses using grep

2011-04-10 Thread C.DeRykus
On Apr 9, 1:04 pm, alanhag...@alanhaggai.org (Alan Haggai Alavi) wrote: > > ... > > #!usr/bin/perl > > For increased portability, use the shebang #!/usr/bin/env perl > Hm, portable only in limited situations, risky, and always slower. From: http://www.webmasterkb.com/Uwe/Forum.aspx/perl/3968/

Re: trouble matching words with parentheses using grep

2011-04-09 Thread John W. Krahn
Mariano Loza Coll wrote: Hello everyone, Hello, Here's what I need to do: I need to take each of the words in one List1, search for their presence (or not) in a second List2 and make a new list with all the words in both. These are lists of gene names, which can often include numbers and symb

Re: trouble matching words with parentheses using grep

2011-04-09 Thread Alan Haggai Alavi
Hello Mariano, use List::MoreUtils qw( any each_array ); I was experimenting and forgot to take off `each_array` from the import list. `each_array` is not used in the alternative solution and is hence not required. Regards, Alan Haggai Alavi. -- The difference makes the difference -- To uns

Re: trouble matching words with parentheses using grep

2011-04-09 Thread Alan Haggai Alavi
Hello Mariano, I realize that there may be a number of ways to do what I need to do (most of them better, I bet), and I'd love to learn about them. But now I'm mostly curious about why grep// cannot "see" words with parentheses in either (or both lists). I suspect the trick may be somehow escapi

Re: trouble with nested forks() (keep spawning twin process)

2009-04-16 Thread Chas. Owens
On Thu, Apr 16, 2009 at 08:32, Michael Alipio wrote: snip > > die "Could not fork command1!" unless defined (my $command1_pid = fork); I am going to number the processes here. 1 will be the first child, 1.1 will be the first child's child. > if ($command1_pid == 0){ Only the child will have th

Re: trouble with nested forks() (keep spawning twin process)

2009-04-16 Thread Jay Savage
On Thu, Apr 16, 2009 at 8:32 AM, Michael Alipio wrote: > > Hi, > > I have this code: > > die "Could not fork command1!" unless defined (my $command1_pid = fork); > if ($command1_pid == 0){ >  open EXTERNAL_PROG1, "external_prog1 |" or die "Can't run external_prog1"; > >  while (){ >    if (/patter

Re: trouble with 'tr' command

2009-01-06 Thread Tony Esposito
I tried $foo =~ s/,/$field_term/g; and it worked fine ... thx. From: John W. Krahn To: Perl Beginners Sent: Tuesday, 6 January, 2009 13:19:20 Subject: Re: trouble with 'tr' command Tony Esposito wrote: > Hello, Hello, > Trying to do the f

Re: trouble with 'tr' command

2009-01-06 Thread John W. Krahn
Tony Esposito wrote: Hello, Hello, Trying to do the following and the variable $field_term does not transiterate. The $foo becomes "name$age$grade$school$semester". #!/usr/bin/perl my $field_term = '|'; my $foo = "name,age,grade,school,semester"; $foo =~ tr/,/$field_term/; __END__

Re: trouble with a regular expresion

2008-10-23 Thread John W. Krahn
Kirk Wythers wrote: On Oct 23, 2008, at 11:09 PM, John W. Krahn wrote: Kirk Wythers wrote: Below is snipit of code that is intended to read in the station_id from the header of each example file. In each case the reg expression is supposed to find the 6 digit number within the parentheses. B

Re: trouble with a regular expresion

2008-10-23 Thread John W. Krahn
Kirk Wythers wrote: Below is snipit of code that is intended to read in the station_id from the header of each example file. In each case the reg expression is supposed to find the 6 digit number within the parentheses. Both files contain 6 lines in the header. For some reason the reg expressio

RE: Trouble with CPAN login

2008-03-06 Thread RICHARD FERNANDEZ
-Original Message- From: Rodrick Brown [mailto:[EMAIL PROTECTED] looks like local user error are you sure the credentials your supplying are correct? Hi Rodrick, The credentials I've configured in CPAN match the ones in my .netrc file which allows me to login successfully from a com

Re: Trouble with CPAN login

2008-03-06 Thread Rodrick Brown
looks like local user error are you sure the credentials your supplying are correct? On Thu, Mar 6, 2008 at 4:13 PM, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm trying to access a local CPAN mirror over FTP and am unable to > connect. > > cpan> reload index > CPAN: Storable lo

Re: Trouble with Email::MIME modules

2007-11-30 Thread Celejar
On Tue, 27 Nov 2007 22:21:06 +0100 "Filip Sneppe" <[EMAIL PROTECTED]> wrote: > I am calling this code like this: > > my $parser = new MIME::Parser; > $entity = $parser->parse_data($lines); > $convertedstring = convert_mime_to_8bit($log_fh, $loglevel, > $entity, ""); > > w

Re: Trouble with Email::MIME modules

2007-11-29 Thread Tom Phoenix
On 11/27/07, Filip Sneppe <[EMAIL PROTECTED]> wrote: > - for some reason, for every attachment in the email, it creates files on the > local filesystem. I don't want to have to clean these up manually. The module should provide some way to clean these up, if it creates them. > - more important

Re: Trouble with Email::MIME modules

2007-11-27 Thread Filip Sneppe
On Nov 27, 2007 7:20 PM, Tom Phoenix <[EMAIL PROTECTED]> wrote: > Well, the first part of what you'd like would seem to imply that > somebody else should write your program for you. But maybe you don't > mean that, you just want code that shows how to use the module? Any > good module should inclu

Re: Trouble with Email::MIME modules

2007-11-27 Thread Tom Phoenix
On 11/27/07, Filip Sneppe <[EMAIL PROTECTED]> wrote: > At this point I am getting so frustrated that I would simply like > to look at working code of what I need to achieve and then learn > where I went wrong. Well, the first part of what you'd like would seem to imply that somebody else should w

Re: Trouble Installing Carp-Clan 5.9.x

2007-11-27 Thread Gerald Wheeler
Sorry about the top posting.. Is there a way to resolve the make problem for Bit::Vector J. >>> "Jenda Krynicky" <[EMAIL PROTECTED]> 11/27/2007 5:57:13 AM >>> And if you reply to someone you should trim down the message ... there is no reason to include the unsubscribe notice three times. - Beca

Re: Trouble Installing Carp-Clan 5.9.x

2007-11-27 Thread Jenda Krynicky
And if you reply to someone you should trim down the message ... there is no reason to include the unsubscribe notice three times. - Because then it's all backwards. - Why is that? - Please, don't top post! From: "Gerald Wheeler" <[EMAIL PROTECTED]> > Correction, I did get to the end of one bra

Re: Trouble Installing Carp-Clan 5.9.x

2007-11-26 Thread Gerald Wheeler
Correction, I did get to the end of one branch.. no further prerequisites. However, I got this error at the top of the next branch - Bit::Vector *--- ls Artistic.txt CHANGES.txt GNU_GPL.txt lib MANIFEST t Vector.pm BitVector.c CREDITS.txt GNU_LGPL.txt Makefile

Re: Trouble Installing Carp-Clan 5.9.x

2007-11-26 Thread Gerald Wheeler
It appears that there is no end to the prerequisites for any given module.. Are they all really necessary for a build?? test??? Thanks J. >>> "Tom Phoenix" <[EMAIL PROTECTED]> 11/26/2007 2:03 PM >>> On 11/26/07, Gerald Wheeler <[EMAIL PROTECTED]> wrote: > t/10basic..Can't locate Test/Exce

Re: Trouble Installing Carp-Clan 5.9.x

2007-11-26 Thread Tom Phoenix
On 11/26/07, Gerald Wheeler <[EMAIL PROTECTED]> wrote: > t/10basic..Can't locate Test/Exception.pm in @INC (@INC It looks as if the test failed when it couldn't find a module named Test::Exception. Is that module installed on your system? It may be needed for the tests, even if it's not l

Re: Trouble with Perl Standalone Executable

2007-10-26 Thread Chas. Owens
On 10/26/07, Yoyoyo Yoyoyoyo <[EMAIL PROTECTED]> wrote: > Oh, I thought that they might be portable between OSs. My bad. PAR files can be: http://search.cpan.org/~smueller/PAR-0.976/lib/PAR/Tutorial.pod#Cross-platform_Packages But the binaries created by pp can't: http://search.cpan.org/~smuelle

Re: Trouble with Perl Standalone Executable

2007-10-26 Thread Yoyoyo Yoyoyoyo
Oh, I thought that they might be portable between OSs. My bad. "Chas. Owens" <[EMAIL PROTECTED]> wrote: On 10/26/07, Yoyoyo Yoyoyoyo wrote: > Hi all, > > I was interested in compiling my Perl code. I came across the following site > that shows how to do it: > > http://www.expertsrt.com/tutoria

Re: Trouble with Perl Standalone Executable

2007-10-26 Thread Chas. Owens
On 10/26/07, Yoyoyo Yoyoyoyo <[EMAIL PROTECTED]> wrote: > Hi all, > > I was interested in compiling my Perl code. I came across the following site > that shows how to do it: > > http://www.expertsrt.com/tutorials/Matt/perlPAR.html > > I followed the instructions (I am using PAR and PAR-Packer ver

Re: Trouble with activestate perl for windows

2007-08-30 Thread anders
On 29 Aug, 22:17, [EMAIL PROTECTED] (Caduceus) wrote: > Every time I try to use perl 5.8.8 I keep geting the error message > "Barewood found where operator expected at - line 1, near "/perl/bin" > " What am I doing wrong here and how can > I fix it. I'm using activestate perl. The command I'm tryi

Re: Trouble with activestate perl for windows

2007-08-30 Thread anders
On 29 Aug, 22:17, [EMAIL PROTECTED] (Caduceus) wrote: > Every time I try to use perl 5.8.8 I keep geting the error message > "Barewood found where operator expected at - line 1, near "/perl/bin" > " What am I doing wrong here and how can > I fix it. I'm using activestate perl. The command I'm tryi

Re: Trouble with activestate perl for windows

2007-08-30 Thread Tom Phoenix
On 8/29/07, Caduceus <[EMAIL PROTECTED]> wrote: > Every time I try to use perl 5.8.8 I keep geting the error message > "Barewood found where operator expected at - line 1, near "/perl/bin" > " What am I doing wrong here and how can > I fix it. The message says that you're running a Perl program

Re: trouble reading subdirectories and files in a directory

2007-07-06 Thread Mumia W.
On 07/06/2007 04:46 PM, Chris Ryan wrote: yitzle wrote: 1) There are filesystem modules already out there. 2) You might want to consider using a more generic recursive structure. 3) To answer your question, check its a directory and not a file. while ($yearly = readdir(TOTALHANDLE)) { next unl

Re: trouble reading subdirectories and files in a directory

2007-07-06 Thread Chris Ryan
I understand the -next- concept, but adding this line made no difference. I got the same output as without it. --Chris yitzle wrote: > 1) There are filesystem modules already out there. > 2) You might want to consider using a more generic recursive structure. > > 3) To answer your question, che

Re: trouble reading subdirectories and files in a directory

2007-07-06 Thread Chris Ryan
Thanks. I was vaguely aware of modules that would do this. Doing it "by hand" at first is a good learning exercise for me. I can indeed check to see if the thing I'm looking at is a directory. But why does it do this? Can you help me understand why when I think I am "in" one directory, my script

Re: trouble reading subdirectories and files in a directory

2007-07-06 Thread yitzle
1) There are filesystem modules already out there. 2) You might want to consider using a more generic recursive structure. 3) To answer your question, check its a directory and not a file. while ($yearly = readdir(TOTALHANDLE)) { next unless (-d $yearly); -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Trouble installing with CPAN

2007-06-20 Thread Mumia W.
On 06/20/2007 08:40 AM, yitzle wrote: I took down the firewall and got the same results. Could not fetch authors/id/K/KA/KASEI/Crypt-Simple-0.06.tar.gz Giving up on '/home/Admin/.cpan/sources/authors/id/K/KA/KASEI/Crypt-Simple-0.06.tar.gz' Note: Current database in memory was generated on Sat,

Re: Trouble installing with CPAN

2007-06-20 Thread Tom Phoenix
On 6/20/07, yitzle <[EMAIL PROTECTED]> wrote: I tried to install Crypt::Simple using the CPAN shell Can you install other modules using the CPAN shell? Can you install this module without the CPAN shell? It seems to be available here: http://search.cpan.org/CPAN/authors/id/K/KA/KASEI/Cryp

Re: Trouble installing with CPAN

2007-06-20 Thread yitzle
I took down the firewall and got the same results. Could not fetch authors/id/K/KA/KASEI/Crypt-Simple-0.06.tar.gz Giving up on '/home/Admin/.cpan/sources/authors/id/K/KA/KASEI/Crypt-Simple-0.06.tar.gz' Note: Current database in memory was generated on Sat, 05 May 2007 21:09:57 GMT On 6/20/07, y

Re: Trouble with backtracking in RE

2007-04-10 Thread Tom Phoenix
On 4/10/07, Jan Chorowski <[EMAIL PROTECTED]> wrote: I can't understand why the following regexp matches. It doesn't match for me. Are you sure that you posted the correct code? I'm using perl version 5.8.6. --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: trouble with list context assignment for substitution inside File::Find &wanted function

2007-01-25 Thread D. Bolliger
Michael Alipio am Mittwoch, 24. Januar 2007 04:21: > From: John W. Krahn <[EMAIL PROTECTED]> > Sent: Wednesday, January 24, 2007 10:57:51 AM > > Yes, the substitution operator (s///) returns true (1) or false ('') in > > either list or scalar context. To do want you want you have to do the > > as

Re: trouble with list context assignment for substitution inside File::Find &wanted function

2007-01-23 Thread Jason Roth
> Do you have a perl one-liner to rename all files into their > filenames with stripped "^\w+". No. Yes. /^\w+-/ and rename $_, $' for (glob "*") -Jason -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: trouble with list context assignment for substitution inside File::Find &wanted function

2007-01-23 Thread Michael Alipio
- Original Message From: John W. Krahn <[EMAIL PROTECTED]> To: Perl Beginners Sent: Wednesday, January 24, 2007 10:57:51 AM Subject: Re: trouble with list context assignment for substitution inside File::Find &wanted function > Yes, the substitution operator (s///) re

Re: trouble with list context assignment for substitution inside File::Find &wanted function

2007-01-23 Thread John W. Krahn
Michael Alipio wrote: > Hi, Hello, > I have a directory which contains several files. > > client1-2006-05-19.log.gz > client1-2006-05-20.log.gz > client1-2006-07-29.log.gz > client1-2006-10-05.log.gz > client1-2006-05-21.log.gz > > > I want strip all of "axisglobal-" in their filenames. >

Re: Trouble appending into gzipped file using Compress::Zlib (Re: compressing files into tar.gz (which module do you prefer)

2007-01-22 Thread Rob Dixon
Michael Alipio wrote: From: Rob Dixon <[EMAIL PROTECTED]> Michael Alipio wrote: After parsing a log and writing it into a file, I now, have to compress it into tar.gz. Right now, I'm doing a search at CPAN and there where too many modules out there with "compress" or "archive" search keyword

Re: Trouble installing module

2006-11-07 Thread Adriano Rodrigues
On 11/7/06, C. R. <[EMAIL PROTECTED]> wrote: Thanks for your advice, but why do I need a compiler if I'm just using Perl to process an XML text file? That adds a level of complexity we just don't want to get into. Because XML::Parser has parts written in Perl and C. It is a hybrid module and re

Re: Trouble installing module

2006-11-07 Thread lawrence
> In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] says... > > There should be a version of make in /usr/ccs/bin > > Giggidy! You're right! Thanks. > > > > I'm guessing I entered the wrong site name for the Perl CPAN module > > > config. Can anyone help me? > > > > Well, here's your Dolla

Re: Trouble installing module

2006-11-07 Thread C . R .
When I do a "reload index" in CPAN this is what I get. cpan> reload index LWP not available Please check, if the URLs I found in your configuration file (http://141.217.1.55/cpan/ http://216.52.237.135 ftp://69.16.251.60/CPAN/) are valid. The urllist can b

Re: Trouble installing module

2006-11-07 Thread C . R .
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > There should be a version of make in /usr/ccs/bin Giggidy! You're right! Thanks. > > I'm guessing I entered the wrong site name for the Perl CPAN module > > config. Can anyone help me? > > Well, here's your Dollars' worth of free ad

Re: Trouble installing module

2006-11-06 Thread Jay Savage
On 11/6/06, C. R. <[EMAIL PROTECTED]> wrote: Hi, I have a Solaris system. I'm having trouble installing a module via the command: perl -MCPAN -e shell 'install XML::Parser' This is the first time my perl 5.6.1 installation has used CPAN to install a module so I had to answer a bunch of questions

Re: Trouble installing module

2006-11-06 Thread lawrence
> > Hi, I have a Solaris system. I'm having trouble installing a module via > the command: > perl -MCPAN -e shell 'install XML::Parser' > > This is the first time my perl 5.6.1 installation has used CPAN to > install a module so I had to answer a bunch of questions for > configuration. > >

Re: Trouble with variable scoping

2006-09-01 Thread Dr.Ruud
"Moon, John" schreef: > Maybe you want.. > > Use vars qw(@excludedIPAddresses); s/Use/use/, but: "use vars" has been antiquated by "our()". -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Trouble with variable scoping

2006-09-01 Thread John W. Krahn
Roman Daszczyszak wrote: > > What is the scope of a variable that is declared at the top of a > file using 'my'? > I had thought that this would just make a variable that is scoped to > the entire file, yet 'local' does not localize the variable in a > subroutine, even though it (local) accord

RE: Trouble with variable scoping

2006-09-01 Thread Roman Daszczyszak
From: "Charles K. Clarkson" <[EMAIL PROTECTED]> To: Date: Thu, 31 Aug 2006 10:41:33 -0500 Subject: RE: Trouble with variable scoping Roman Daszczyszak wrote: : In my perl script, I have a "global" variable called : @excludedIPAddresses, declared at the top of the sc

Re: Trouble with variable scoping

2006-08-31 Thread Randy W. Sims
John W. Krahn wrote: Randy W. Sims wrote: Roman Daszczyszak wrote: In my perl script, I have a "global" variable called @excludedIPAddresses, declared at the top of the script using my: [...] When I run this, I get an error "Can't localize lexical variable". I understand that it's because th

Re: Trouble with variable scoping

2006-08-31 Thread John W. Krahn
Randy W. Sims wrote: > Roman Daszczyszak wrote: >> In my perl script, I have a "global" variable called >> @excludedIPAddresses, declared at the top of the script using my: > [...] >> >> When I run this, I get an error "Can't localize lexical variable". I >> understand that it's because the variab

Re: Trouble with variable scoping

2006-08-31 Thread Randy W. Sims
Roman Daszczyszak wrote: In my perl script, I have a "global" variable called @excludedIPAddresses, declared at the top of the script using my: [...] When I run this, I get an error "Can't localize lexical variable". I understand that it's because the variable is declared using "my"; what I d

Re: Trouble with variable scoping

2006-08-31 Thread Mumia W.
On 08/31/2006 08:19 AM, Roman Daszczyszak wrote: In my perl script, I have a "global" variable called @excludedIPAddresses, [...] my @excludedIPAddresses = qw# 192.168.0.142 192.168.3.118 #;# [...] local @excludedIPAddresses = @excludedIPAddresses; [...] When I run this, I get an error "

RE: Trouble with variable scoping

2006-08-31 Thread Charles K. Clarkson
Roman Daszczyszak wrote: : In my perl script, I have a "global" variable called : @excludedIPAddresses, declared at the top of the script using : my. That sounds like a bad idea, but go on. : When I run this, I get an error "Can't localize lexical : variable". I understand that it's because

RE: Trouble with variable scoping

2006-08-31 Thread Moon, John
When I run this, I get an error "Can't localize lexical variable". I understand that it's because the variable is declared using "my"; what I don't understand is why, or what I should declare the variable as, since if I leave out "my" I get an error using "use strict". Maybe you want.. Use va

RE: Trouble simplifying hash of array access

2006-08-09 Thread Smith, Jim R
Try this: @[EMAIL PROTECTED]'EST'}}; print $info[3]; regards, jimbob __ -Original Message- From: n[ate]vw [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 1:12 PM To: beginners@perl.org Subject: Trouble simplifying hash of array

Re: Trouble simplifying hash of array access

2006-08-08 Thread n\[ate\]vw
Mumia W. wrote: On 08/08/2006 12:12 PM, n[ate]vw wrote: That gets repetitive, so I'd like to simplify it this way: @[EMAIL PROTECTED]'EST'}; print $info[3]; ...but that doesn't work! Nothing prints. What am I doing wrong? You're not using the array reference in zone_info correctly. my $i

Re: Trouble simplifying hash of array access

2006-08-08 Thread n\[ate\]vw
Tom Phoenix wrote: On 8/8/06, n[ate]vw <[EMAIL PROTECTED]> wrote: What am I doing wrong? You're probably not using 'use strict', else it would have given you a helpful diagnostic message that you'd find in the perldiag manpage. Cheers! Heh! I'll have to turn that on before starting my next

Re: Trouble simplifying hash of array access

2006-08-08 Thread Mumia W.
On 08/08/2006 12:12 PM, n[ate]vw wrote: I'm having some trouble using a hash of arrays. I thought I was starting to understand the jumbled mass of variable use in Perl, but perhaps not... Instead of the missing switch() statement, I'm using a hash set up like this: %zone_info = ( 'EST' =>

Re: Trouble simplifying hash of array access

2006-08-08 Thread John W. Krahn
n[ate]vw wrote: > I'm having some trouble using a hash of arrays. I thought I was starting > to understand the jumbled mass of variable use in Perl, but perhaps not... > > Instead of the missing switch() statement, I'm using a hash set up like > this: > > %zone_info = ( > 'EST' => [5,'EST', 4,'

Re: Trouble simplifying hash of array access

2006-08-08 Thread Tom Phoenix
On 8/8/06, n[ate]vw <[EMAIL PROTECTED]> wrote: What am I doing wrong? You're probably not using 'use strict', else it would have given you a helpful diagnostic message that you'd find in the perldiag manpage. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PR

Re: Trouble with line endings

2006-02-10 Thread Xavier Noria
On Feb 10, 2006, at 18:17, Rick Triplett wrote: I've encountered a perplexing file-reading difficulty. I pasted some dictionary definitions from a web page into Word and saved them as a text file. All the odd numbered lines had terms and their following even numbered lines had definitions.

Re: Trouble with line endings

2006-02-10 Thread Chas Owens
On 2/10/06, Rick Triplett <[EMAIL PROTECTED]> wrote: snip > My perplexities are these: Why did TextWrangler show \r for the line > endings after I had save them for Unix (\n)? And, why did Perl have > difficulty with the line endings in the first place? Perl is supposed > to be sensitive to the ope

Re: trouble using to access hash values

2005-06-06 Thread Steve McQ
On Mon, 6 Jun 2005 11:41:59 -0400 (EDT) "Joseph Uri Podwol" <[EMAIL PROTECTED]> wrote: > $rate = $rates{$to} / $rates{from}; from should be $from. -- Steve McQ | http://www.tigertrails.com [EMAIL PROTECTED] | Linux Registered User: 294367 -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Trouble Calling Modules...

2005-01-06 Thread Ron Wingfield
beginners@perl.org Sent: Thursday, January 06, 2005 5:37 PM Subject: Re: Trouble Calling Modules... On Thu, 6 Jan 2005, Sam Pinizzotto wrote: > > I'm very new to the Perl Scene...I have an application that was developed > for Perl TK and we are now trying to conver

Re: Trouble Calling Modules...

2005-01-06 Thread Owen Cook
On Thu, 6 Jan 2005, Sam Pinizzotto wrote: > > I'm very new to the Perl Scene...I have an application that was developed > for Perl TK and we are now trying to convert it for use through the web. > > I can pass the info from a web form to the script, but when the script runs, > it says it can't

RE: Trouble running a script with cron

2005-01-03 Thread Rafael Morales
Yes, Bob it works perefect now, thanks. Regards. - Original Message - From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'Rafael Morales'" <[EMAIL PROTECTED]>, beginners@perl.org Subject: RE: Trouble running a script with cron Date: Wed, 29 De

Re: Trouble using shift

2005-01-02 Thread Jenda Krynicky
From: Oisin Peavoy <[EMAIL PROTECTED]> > I have a Perl program which I'm having some difficulty with, > essentially I'm > trying to `shift()' all the ellements in an array untill an element > containing a forward slash is encountered. Howerver, the method I'm > using is producing incorrect results

Re: Trouble using shift

2004-12-31 Thread Alfred Vahau
Translated thus: #!/usr/bin/perl -w use strict; my @array = qw(fairy goblin /emerald dust dice); shift @array while @array && $array[0] !~ m!/!; print "@array"; Confirmed that it works in Perl on WinXP. However, the solution seems a bit elegant for a beginner. Even the condition: if(/(^\/)/){ ..

Re: Trouble using shift

2004-12-31 Thread Paul Johnson
On Fri, Dec 31, 2004 at 03:25:53PM +, Oisin Peavoy wrote: > Hi, > > I have a Perl program which I'm having some difficulty with, > essentially I'm trying to `shift()' all the ellements in an array > untill an element containing a forward slash is encountered. Howerver, > the method I'm using i

RE: Trouble running a script with cron

2004-12-29 Thread Bob Showalter
Rafael Morales wrote: > Hi list. > > I need to put a script in cron, but this script needs exec some > Oracle variables for work fine, these variables are: > export ORACLE_HOME=/oracle/app/product/9.2.0 > export ORACLE_SID=galdb > export LD_LIBRARY_PATH=/oracle/app/product/9.2.0/lib32 > export NL

RE: Trouble with format

2004-12-14 Thread Moon, John
This is my code (something very simple): $variable = "Ordenes\nServicios\nGarantias"; format ORDENES = Text: ^* $variable ~~^* $variable . But I don't know how can I see or print the output of this, and send it bye email. I tried with write(), b

Re: Trouble with compound regular expression matching

2004-12-07 Thread Ing. Branislav Gerzo
Stout, Joel R [SJR], on Tuesday, December 7, 2004 at 00:55 (-) typed: SJR> use File::Basename; SJR> $fullname = "/usr/local/pics/sample.tiff"; #for example SJR> ($file,$dir,$_) = fileparse($fullname, qr/\..*/); SJR> if (/\.(tif|tiff|jpg|jpeg)$/) { SJR> print "This is an image file.\n"; SJR

RE: Trouble with compound regular expression matching

2004-12-07 Thread Stout, Joel R
, December 06, 2004 4:19 PM To: 'Jeffrey Paul Burger' Subject: RE: Trouble with compound regular expression matching This one worked for me: /^.*\.[tj][pi][gfe].*$/ Hope this helps - Paul -Original Message- From: Jeffrey Paul Burger [mailto:[EMAIL PROTECTED] Sent: Monday,

Re: Trouble with compound regular expression matching

2004-12-07 Thread Ing. Branislav Gerzo
Jeffrey Paul Burger [JPB], on Monday, December 06, 2004 at 17:05 (-0700) typed the following: JPB> if ($file_name !~ /tif$/i) {} JPB> if ($file_name !~ m/tif\b/i) {} JPB> if ($file_name !~ m/.*.tif/i) {} what about this: print "PIC is $1" if ($file_name =~ /\.(tif?f|jpe?g)$/i); -- ...m8s, cu

Re: Trouble with compound regular expression matching

2004-12-06 Thread Jeffrey Paul Burger
: <[EMAIL PROTECTED]> > Date: Mon, 6 Dec 2004 17:13:54 -0700 > To: <[EMAIL PROTECTED]> > Cc: Jeffrey Paul Burger <[EMAIL PROTECTED]> > Subject: Re: Trouble with compound regular expression matching > > On Monday 06 December 2004 05:05 pm, Jeffrey Paul Burger wrote

Re: Trouble with compound regular expression matching

2004-12-06 Thread pablo wablo
Sorry bout that blank email... anyway... I thnk this would work $filename =~ /(?:jpe?g$)|(?:tif?f$)/i I think this one is wrong because you actually have two patterns here... if ($file_name !~ /tif$/i | /jpg$/i) {} maybe you could try doing it like this.. if($file_name !~ /(tif$)|(jpg$)/i no

Re: Trouble with compound regular expression matching

2004-12-06 Thread pablo wablo
--- Jeffrey Paul Burger <[EMAIL PROTECTED]> wrote: > I tried everything I could think of to get this to > work before pleading for > help! > > I need to check if a file is either a TIFF or JPEG > graphics file. > (Case-insensitive variations of qualifying suffixes > would be .tif, .tiff, > .jpg

Re: Trouble with compound regular expression matching

2004-12-06 Thread Lawrence Statton
> Okay, now I have to admit I'm also new to Perl, but I can adapt to change: > > /^.*\.[tj][pi][gfe].{0,1}$/i > > I threw in the quantifier to avoid what Felix exposed. Now, there's > probably a hole in this somewhere, but it's got to be a small one... > > -Paul > Zeroth: It would better

RE: Trouble with compound regular expression matching

2004-12-06 Thread Paul Ohashi
--- From: Felix Li [mailto:[EMAIL PROTECTED] Sent: Monday, December 06, 2004 4:38 PM To: Paul Ohashi Subject: Re: Trouble with compound regular expression matching print "No!" if "i.tied.my.shoes" =~/^.*\.[tj][pi][gfe].*$/i; - Original Message - From: "Paul

Re: Trouble with compound regular expression matching

2004-12-06 Thread Eric Walker
On Monday 06 December 2004 05:05 pm, Jeffrey Paul Burger wrote: > I tried everything I could think of to get this to work before pleading for > help! > > I need to check if a file is either a TIFF or JPEG graphics file. > (Case-insensitive variations of qualifying suffixes would be .tif, .tiff, > .

Re: Trouble with m///g

2004-09-30 Thread Chap Harrison
On Sep 30, 2004, at 10:41 AM, Jan Eden wrote: my @a = ($foo =~ m'(? Careful, you mistyped the original proposition: my @a = ($foo =~ m'(? Oops, sorry - I copied that into the email from Wiggins' reply, but actually tested with Dave Gray's. Didn't notice the difference. What you posted gives the

Re: Trouble with m///g

2004-09-30 Thread Jan Eden
Chap Harrison wrote on 30.09.2004: > >On Sep 30, 2004, at 9:55 AM, Wiggins d Anconia wrote: > >> Out of curiousity based on your description shouldn't it return, >> >> ::::::: >> >> Or do you really mean, you are trying to capture all 4 digit strings >> that are not

Re: Trouble with m///g

2004-09-30 Thread Dave Gray
> TIMTOWTDI: > > @list = grep length==4, /\d+/g Shouldn't that be: @list = grep length==4, $foo =~ /\d+/g; Cool solution, I wouldn't have thought to do it that way. I'm getting varying Benchmarking results, though. I think it might have something to do with grep speedups from 5.6.1 to 5.8.0.

Re: Trouble with m///g

2004-09-30 Thread Chap Harrison
On Sep 30, 2004, at 9:55 AM, Wiggins d Anconia wrote: Out of curiousity based on your description shouldn't it return, ::::::: Or do you really mean, you are trying to capture all 4 digit strings that are not in a string of longer digits? You need to be very explic

Re: Trouble with m///g

2004-09-30 Thread Gunnar Hjalmarsson
Chap Harrison wrote: I'm trying to extract all four-digit numbers from a string in one fell swoop, but I can't seem to come up with the proper regexp. This is my first time using /g in a match so maybe there's a trick I'm missing. For example, the string " aa 444 -

RE: Trouble with m///g

2004-09-30 Thread Bob Showalter
Chap Harrison wrote: > Hi, > > I'm trying to extract all four-digit numbers from a string in one fell > swoop, but I can't seem to come up with the proper regexp. This is my > first time using /g in a match so maybe there's a trick I'm missing. > > For example, the string > > " aa 4

Re: Trouble with m///g

2004-09-30 Thread Chap Harrison
Hmmm... m'\b(\d{4})\b'g < aa 444 -> ::: Doesn't give me or . I think the problem has to do with where m///g starts on subsequent iterations. The pattern specifies a delimiter for both the start and the end of the target substring, but

RE: Trouble with m///g

2004-09-30 Thread Wiggins d Anconia
Please bottom post... > I think this might work. > It might, but doesn't. Some testing would be good before posting inaccurate responses. > /\b\d{4}\b/ > \b is matching on boundaries, so you miss the first set, and the set with the 'aa' around them, and then there is the set with the '-'

Re: Trouble with m///g

2004-09-30 Thread Dave Gray
> For example, the string > > " aa 444 -" > > should yield > > , , , , , . That's actually kind of tricky. How about: $aa = " aa 444 -"; @aa = $aa =~ /(?http://learn.perl.org/>

RE: Trouble with m///g

2004-09-30 Thread Hanson, Rob
I think this might work. /\b\d{4}\b/ Rob -Original Message- From: Chap Harrison [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 10:38 AM To: [EMAIL PROTECTED] Subject: Trouble with m///g Hi, I'm trying to extract all four-digit numbers from a string in one fell swoop, bu

Re: Trouble with PERL and HTML

2004-07-25 Thread renzo rizzato
Alle 20:24, domenica 25 luglio 2004, David Dorward ha scritto: > On Sun, 2004-07-25 at 19:17, renzo rizzato wrote: > > The requested URL /cgi-bin/index.html was not found on this server. > > > > For a reason I cannot understand, the system keeps to stay in the cgi-bin > > directory, why? > > You ha

Re: Trouble with PERL and HTML

2004-07-25 Thread Gunnar Hjalmarsson
Renzo Rizzato wrote: Hallo to all from a newby, I am facing the following problem, in a HTML document (www.primocenter.net) I put the intruction, in the guest.html: , when I press submit, effectively, the program opens the file /cgi-bin/mail.it, but when i try, from the last, to the home page, I ge

Re: Trouble with PERL and HTML

2004-07-25 Thread David Dorward
On Sun, 2004-07-25 at 19:17, renzo rizzato wrote: > The requested URL /cgi-bin/index.html was not found on this server. > For a reason I cannot understand, the system keeps to stay in the cgi-bin > directory, why? You haven't shown any code, so I'm going to make a wild guess. You have a link t

  1   2   >