Re: avoid errors when printing to socket

2021-10-02 Thread hw
On Fri, 2021-10-01 at 17:01 -0500, Andy Bach wrote: > > If the signal would be caught, I could handle the error and try to > reconnect, or, if that also fails, do something else. > > Oh. I was thinking you wanted it to check the connection before trying to > print. Well, the print stmt returning u

Re: avoid errors when printing to socket

2021-10-01 Thread Andy Bach
> If the signal would be caught, I could handle the error and try to reconnect, or, if that also fails, do something else. Oh. I was thinking you wanted it to check the connection before trying to print. Well, the print stmt returning undef will tell you the same thing. Hmm, it would appear print

Re: avoid errors when printing to socket

2021-09-30 Thread hw
On Thursday, September 30, 2021 9:30:01 PM CEST Andy Bach wrote: > > https://perldoc.perl.org/functions/print says that 'print' would return > > true > > > if successful and doesn't say what it returns otherwise. It also says > > that > > > "Printing to a closed pipe or socket will generate a

Re: avoid errors when printing to socket

2021-09-30 Thread Andy Bach
> https://perldoc.perl.org/functions/print says that 'print' would return true > if successful and doesn't say what it returns otherwise. It also says that > "Printing to a closed pipe or socket will generate a SIGPIPE signal." Looks like print returns 1 if it succeeds, undef if not: $ perl -wE '

avoid errors when printing to socket

2021-09-30 Thread hw
Hi, I have a program in which I'm creating an UDP socket with IO::Socket::INET to a device on my LAN. Opening the socket yields no error. Writing to the socket with 'print' works fine. The device sends data back, and receiving the data works fine. But it doesn't work when the device is offl

Re: obstinate syntax errors

2018-01-19 Thread Darryl Philip Baker
I don't have the time to put everything around this to do the syntax test but what happens with this: If ( ! chdir "/big/dom/x$server/data/students/$progress_hash{student_id}/" ) { $message = "Can't change directory to $progress_hash{student_id}: $!"; report_e

Re: obstinate syntax errors

2018-01-19 Thread Uri Guttman
On 01/19/2018 01:43 PM, Darryl Philip Baker wrote: I don't have the time to put everything around this to do the syntax test but what happens with this: If ( ! chdir "/big/dom/x$server/data/students/$progress_hash{student_id}/" ) { $message = "Can't change directory to $

Re: obstinate syntax errors

2018-01-19 Thread Rick T
Uri, Thank you SO much for your helpful comments! You didn’t just solve THIS problem, you’ve helped me in my future programming! Rick > On Jan 19, 2018, at 11:56 AM, Uri Guttman wrote: > > On 01/19/2018 12:44 PM, Rick T wrote: >> The subroutine below produces the followin

Re: obstinate syntax errors

2018-01-19 Thread Uri Guttman
On 01/19/2018 12:44 PM, Rick T wrote: The subroutine below produces the following syntax errors: syntax error at /big/dom/xexploringmyself/cgi-bin/register.cgi line 71, near ""Can't change directory to $progress_hash{student_id}: $!";" syntax error at /big/dom

obstinate syntax errors

2018-01-19 Thread Rick T
The subroutine below produces the following syntax errors: syntax error at /big/dom/xexploringmyself/cgi-bin/register.cgi line 71, near ""Can't change directory to $progress_hash{student_id}: $!";" syntax error at /big/dom/xexploringmyself/cgi-bin/register.cgi line

Re: perl script with errors?

2015-11-26 Thread Shlomi Fish
Hi Miguel, On Wed, 25 Nov 2015 20:28:48 -0500 Miguel Rodas wrote: > Why am I in this thread? > > Please remove me from it > You are likely subscribed to beginners@perl.org and so receive all E-mails from all threads. For how to unsubscribe, see http://learn.perl.org/faq/beginners.html . Rega

Re: perl script with errors?

2015-11-26 Thread Shlomi Fish
Hi Jin, some comments on your code: On Thu, 26 Nov 2015 08:13:54 +0800 Jin Xu wrote: > Try to use below updated ones: > > #!/usr/bin/perl > use strict; > use warnings; > while (my $line = <>) { You're lacking many empty lines - separating the code into paragraphs. See: http://perl-begin.org/

Re: perl script with errors?

2015-11-25 Thread Miguel Rodas
4. >> Global symbol "$line" requires explicit package name at ./prog164.pl line 5. >> Global symbol "$line" requires explicit package name at ./prog164.pl line 8. >> Global symbol "$result" requires explicit package name at ./prog164.pl line >> 8. >> Global symbol "$line" requires explicit package name at ./prog164.pl line 11. >> Execution of ./prog164.pl aborted due to compilation errors. >> gb@MINT ~/Perl5/perl programs $ >> >> >> What is this error? And what am I doing wrong. >

Re: perl script with errors?

2015-11-25 Thread Jin Xu
bol "$line" requires explicit package name at ./prog164.pl line > 5. > Global symbol "$line" requires explicit package name at ./prog164.pl line > 8. > Global symbol "$result" requires explicit package name at ./prog164.pl > line 8. > Global symbol &q

Re: perl script with errors?

2015-11-25 Thread Rui Fernandes
64.pl > > Global symbol "$line" requires explicit package name at ./prog164.pl > line 4. > > Global symbol "$line" requires explicit package name at ./prog164.pl > line 5. > > Global symbol "$line" requires explicit package name at ./prog164.pl &g

Re: perl script with errors?

2015-11-25 Thread Olivier Le Monnier
/prog164.pl line 5. > Global symbol "$line" requires explicit package name at ./prog164.pl line 8. > Global symbol "$result" requires explicit package name at ./prog164.pl line > 8. > Global symbol "$line" requires explicit package name at ./prog164.pl line >

perl script with errors?

2015-11-25 Thread Gary Baker
line 8. Global symbol "$result" requires explicit package name at ./prog164.pl line 8. Global symbol "$line" requires explicit package name at ./prog164.pl line 11. Execution of ./prog164.pl aborted due to compilation errors. gb@MINT ~/Perl5/perl programs $ What is this error? And what am I doing wrong.

Re: [Bulk] Re: Fwd: Re: LWP/Protocol Errors

2015-05-27 Thread Mike Blezien
On 5/27/2015 7:46 AM, Lawrence Statton wrote: On 05/27/2015 07:33 AM, Mike Blezien wrote: *CONNECTED(0003) --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has re

Re: Fwd: Re: LWP/Protocol Errors

2015-05-27 Thread Lawrence Statton
On 05/27/2015 07:33 AM, Mike Blezien wrote: *CONNECTED(0003) --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 0 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion:

Re: Fwd: Re: LWP/Protocol Errors

2015-05-27 Thread Mike Blezien
On 5/25/2015 12:31 PM, Lawrence Statton wrote: I sent this to the list, but it seems to have gotten clogged in the tubes ... here's another copy Forwarded Message Subject: Re: LWP/Protocol E

Re: LWP/Protocol Errors

2015-05-26 Thread Lawrence Statton
On 05/25/2015 12:02 PM, Mike Blezien wrote: Hello *I use same IPN script on other servers without any issues except one. Is it possible that port 443 is being block or not open due a firewall on the server? Another tidbit of information that just burbled to the top of my brain. On SOME plat

Re: LWP/Protocol Errors

2015-05-26 Thread Lawrence Statton
On 05/25/2015 12:02 PM, Mike Blezien wrote: Hello, I recently setup a Paypal IPN script which worked fine for some time now but now all of a sudden I keep getting these error message: * **Can't connect to www.paypal.com:443 (certificate verify failed)** **LWP::Protocol::https::Socket: SSL conn

Re: LWP/Protocol Errors

2015-05-25 Thread Mike Blezien
On 5/25/2015 12:27 PM, Lawrence Statton wrote: On 05/25/2015 12:02 PM, Mike Blezien wrote: Hello *I use same IPN script on other servers without any issues except one. Is it possible that port

LWP/Protocol Errors

2015-05-25 Thread Mike Blezien
Hello, I recently setup a Paypal IPN script which worked fine for some time now but now all of a sudden I keep getting these error message: Can't connect to www.paypal.com:443 (certificate verify failed) LWP::Protocol::https::So

Re: catching utf8 errors

2015-03-15 Thread Manfred Lotz
On Sun, 15 Mar 2015 23:26:41 +1300 Kent Fredric wrote: > On 15 March 2015 at 21:41, Manfred Lotz wrote: > > > I agree but I thought that in this case I would need to know the > > potential warning messages the :encoding(UTF-8) could issue in > > order to take action in those particular cases. >

Re: catching utf8 errors

2015-03-15 Thread Kent Fredric
On 15 March 2015 at 21:41, Manfred Lotz wrote: > I agree but I thought that in this case I would need to know the > potential warning messages the :encoding(UTF-8) could issue in order to > take action in those particular cases. > > Using a section local > { >open( local *STDERR,'>', $err); >

Re: catching utf8 errors

2015-03-15 Thread Manfred Lotz
On Sun, 15 Mar 2015 21:11:05 +1300 Kent Fredric wrote: > On 15 March 2015 at 20:07, Manfred Lotz wrote: > > > I prefer the method Charles showed. But nevertheless your method is > > interesting as well. > > > > FWIW, SIG{__WARN__} is much preferred over redirecting stderr to > simply suppress/

Re: catching utf8 errors

2015-03-15 Thread Kent Fredric
On 15 March 2015 at 20:07, Manfred Lotz wrote: > I prefer the method Charles showed. But nevertheless your method is > interesting as well. > FWIW, SIG{__WARN__} is much preferred over redirecting stderr to simply suppress/capture/filter warnings. For instance, if somebody passes an object to w

Re: catching utf8 errors

2015-03-15 Thread Manfred Lotz
I prefer the method Charles showed. But nevertheless your method is interesting as well. Thanks for sharing, Manfred On Sat, 14 Mar 2015 14:24:48 -0400 Brandon McCaig wrote: > On Sat, Mar 14, 2015 at 03:20:06AM -0700, Charles DeRykus wrote: > > open my $fh, '<:encoding ) or die ... > > >

Re: catching utf8 errors

2015-03-14 Thread Brandon McCaig
On Sat, Mar 14, 2015 at 03:20:06AM -0700, Charles DeRykus wrote: > open my $fh, '<:encoding ) or die ... > > { open( local *STDERR,'>',\my $err); >my $string = <$fh>; > if ($err =~ /does not map to Unicode/) { > # take action. > } > } Here is an alternative appro

Re: catching utf8 errors

2015-03-14 Thread Manfred Lotz
On Sat, 14 Mar 2015 03:20:06 -0700 Charles DeRykus wrote: > On Sat, Mar 14, 2015 at 2:38 AM, Manfred Lotz > wrote: > > Hi all, > > I wanted to test what happens if Perl encounters an error when > > reading a utf8 encoded file. > > > > Here a minimal example: > > > > #! /usr/bin/perl > > > > use

Re: catching utf8 errors

2015-03-14 Thread Manfred Lotz
On Sat, 14 Mar 2015 23:18:42 +1300 Kent Fredric wrote: > On 14 March 2015 at 22:38, Manfred Lotz wrote: > > > following error message which is fine. > > > Sorry for being pedantic, but I think you'll find that those are what > we call "warnings", not

Re: catching utf8 errors

2015-03-14 Thread Charles DeRykus
On Sat, Mar 14, 2015 at 2:38 AM, Manfred Lotz wrote: > Hi all, > I wanted to test what happens if Perl encounters an error when reading > a utf8 encoded file. > > Here a minimal example: > > #! /usr/bin/perl > > use strict; > use warnings; > > my $fname = $ARGV[0]; > > open my $fh, '<:encoding(UTF

Re: catching utf8 errors

2015-03-14 Thread Kent Fredric
On 14 March 2015 at 22:38, Manfred Lotz wrote: > following error message which is fine. Sorry for being pedantic, but I think you'll find that those are what we call "warnings", not "errors". Errors tend to be fatal. However, curiously, "<:utf8"

catching utf8 errors

2015-03-14 Thread Manfred Lotz
Hi all, I wanted to test what happens if Perl encounters an error when reading a utf8 encoded file. Here a minimal example: #! /usr/bin/perl use strict; use warnings; my $fname = $ARGV[0]; open my $fh, '<:encoding(UTF-8)', $fname or die "Couldn't open file: $fname"; my $string = <$fh>; clo

Re: Identifying the current opened filehandle for writing as I'm getting undefined variable concatenation errors

2014-01-14 Thread Matt McAdory
The comma was a pseudo code error. Should have read = print $FH "some stuff\n"; # works great. = I will test for undef on $thing. Thanks for looking. Pretty sure I printed the expected result to STDOUT without error. The module call involves a telnet across the network, maybe the open I added prov

Re: Identifying the current opened filehandle for writing as I'm getting undefined variable concatenation errors

2014-01-14 Thread Rob Dixon
On 15/01/2014 03:09, Matt McAdory wrote: Is there a method for determining the currently selected filehandle? should I always check for undef and open my filehandle before writing to it? use strict; use warnings; use autodie qw (:all); use My:CustomMod_with_FH_write; open (my $FH, ">", "filena

Re: Identifying the current opened filehandle for writing as I'm getting undefined variable concatenation errors

2014-01-14 Thread Brian Fraser
On Wed, Jan 15, 2014 at 12:09 AM, Matt McAdory wrote: > Is there a method for determining the currently selected filehandle? > should I always check for undef and open my filehandle before writing to it? > > use strict; > use warnings; > use autodie qw (:all); > > use My:CustomMod_with_FH_write;

Identifying the current opened filehandle for writing as I'm getting undefined variable concatenation errors

2014-01-14 Thread Matt McAdory
Is there a method for determining the currently selected filehandle? should I always check for undef and open my filehandle before writing to it? use strict; use warnings; use autodie qw (:all); use My:CustomMod_with_FH_write; open (my $FH, ">", "filename.txt"); my $var = My:CustomMod_with_FH_w

Re: errors building CRYPT:: DES on 64 bit perl usimng Solaris studio 12.3 Solaris 10

2013-07-03 Thread Luca Ferrari
On Sat, Jun 29, 2013 at 12:26 AM, Dariusz Dolecki wrote: > rl10/5.18.0/lib/5.18.0/sun4-solaris-64/CORE" des.c > "des.h", line 1: cannot find include file: I suspect the problem is here. I don't have a solaris machine right now, but for instance on my FreeBSD installation the most similar thing

errors building CRYPT:: DES on 64 bit perl usimng Solaris studio 12.3 Solaris 10

2013-06-28 Thread Dariusz Dolecki
rl10/5.18.0/lib/5.18.0/sun4-solaris-64/CORE" des.c "des.h", line 1: cannot find include file: "des.h", line 3: warning: no explicit type given "des.h", line 3: syntax error before or at: des_user_key "des.h", line 3: warning: old-style declaration or incorrect type for: des_user_key "des.h", lin

Re: errors when importing eps file

2011-12-05 Thread Brandon McCaig
Hello: On Sun, Dec 04, 2011 at 10:22:26AM +, Huub van Niekerk wrote: > Thank you for your response. The variable is defined as: > > my $ps = new PostScript::Simple(papersize => "A4", > colour => 0, > eps => 0, >

Re: errors when importing eps file

2011-12-05 Thread Huub van Niekerk
;> If not so, then you can assume that, problem in that eps only. >> >> Regards, >> MadYuv >> >> >> On Sun, Dec 4, 2011 at 12:52 PM, Jim Gibson >> wrote: >> >>> At 7:05 AM + 12/4/11, Huub van Niekerk wrote: >>> >&g

Re: errors when importing eps file

2011-12-04 Thread Huub van Niekerk
On Sat, 03 Dec 2011 23:22:12 -0800, Jim Gibson wrote: > At 7:05 AM + 12/4/11, Huub van Niekerk wrote: >>Hi, >> >>I'm trying to import an eps file but I get errors. Can somebody tell how >>I can solve either of these 2 errors. BTW, I'm not using them at the

Re: errors when importing eps file

2011-12-04 Thread Huub van Niekerk
t 12:52 PM, Jim Gibson > wrote: > >> At 7:05 AM + 12/4/11, Huub van Niekerk wrote: >> >>> Hi, >>> >>> I'm trying to import an eps file but I get errors. Can somebody tell >>> how I can solve either of these 2 errors. BTW, I'm

Re: errors when importing eps file

2011-12-04 Thread Saravanan Murugaiah
320.6792 %%% If not so, then you can assume that, problem in that eps only. Regards, MadYuv On Sun, Dec 4, 2011 at 12:52 PM, Jim Gibson wrote: > At 7:05 AM + 12/4/11, Huub van Niekerk wrote: > >> Hi, >> >> I'm trying to import an eps file but I get errors. C

Re: errors when importing eps file

2011-12-03 Thread Jim Gibson
At 7:05 AM + 12/4/11, Huub van Niekerk wrote: Hi, I'm trying to import an eps file but I get errors. Can somebody tell how I can solve either of these 2 errors. BTW, I'm not using them at the same time. $ps->importepsfile("/mnt/Kaapstadadmin/HVW/logo-2-gemeentekleuren

errors when importing eps file

2011-12-03 Thread Huub van Niekerk
Hi, I'm trying to import an eps file but I get errors. Can somebody tell how I can solve either of these 2 errors. BTW, I'm not using them at the same time. $ps->importepsfile("/mnt/Kaapstadadmin/HVW/logo-2-gemeentekleuren.eps", 0,0, 151,90); Error with above

Re: Programmatically check for syntax errors without compiling the code

2011-03-30 Thread Michelle Konzack
Hello Magnus Woldrich, please can you send NON-ENCRYPTED messages please? Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsystems@tdne

Re: Programmatically check for syntax errors without compiling the code

2011-03-30 Thread Shawn H Corey
On 11-03-30 08:34 AM, Katie T wrote: "perl -c" will check your script without executing it. Not exactly. From `perldoc perlrun`: -c causes Perl to check the syntax of the program and then exit without executing it. Actually, it will execute "BEGIN", "UNITCHECK", "CHECK", and "use" blocks,

Re: Programmatically check for syntax errors without compiling the code

2011-03-30 Thread Katie T
On Tue, Mar 29, 2011 at 7:04 AM, Magnus Woldrich wrote: > > "perl -c" will check your script without executing it. Katie -- CoderStack http://www.coderstack.co.uk/asp-jobs The Software Developer Job Board

Re: Programmatically check for syntax errors without compiling the code

2011-03-29 Thread terry
2011-3-29 14:04, Magnus Woldrich: Can't see any message body but with two attachments. I'm using thunderbird 3. -- terry - te...@geekmail.de -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Programmatically check for syntax errors without compiling the code

2011-03-29 Thread Magnus Woldrich
binuRX8OPobbD.bin Description: application/pgp-encrypted msg.asc Description: Binary data

Re: how to trap print() errors?

2011-01-18 Thread C.DeRykus
On Jan 17, 3:45 pm, dpchr...@holgerdanske.com (David Christensen) wrote: > Ron Bergin wrote: > > It's interesting that you found the warning message to be meaningless, > > but the exact same message was helpful when you told the pragma to > > raise the level of warnings to be fatal. > > I should ha

Re: how to trap print() errors?

2011-01-17 Thread David Christensen
Ron Bergin wrote: It's interesting that you found the warning message to be meaningless, but the exact same message was helpful when you told the pragma to raise the level of warnings to be fatal. I should have said nearly the same message. Both messages told you where the problem was located

Re: how to trap print() errors?

2011-01-17 Thread David Christensen
Shawn H Corey wrote: Have you looked at `perldoc autodie` yet? I don't know if it'll die on warnings though. Yes, thank you. autodie doesn't seem to be a base package (on my platform), so I continued searching and found: use warnings FATAL => 'all'; which is a better solution for what

Re: how to trap print() errors?

2011-01-17 Thread Shawn H Corey
Have you looked at `perldoc autodie` yet? I don't know if it'll die on warnings though. -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it is about coding. The secret to great

Re: how to trap print() errors?

2011-01-16 Thread Ron Bergin
>>         trapped error Bad file descriptor at trap-print-errors2.pl line >> 12. >> >> 2.  The warnings pragmatic module has an option for turning warnings >> into errors: >> >>         use warnings FATAL => 'all'; >>         print $s @_;

Re: how to trap print() errors?

2011-01-16 Thread Ron Bergin
d file descriptor at trap-print-errors2.pl line 12. > > 2.  The warnings pragmatic module has an option for turning warnings > into errors: > >         use warnings FATAL => 'all'; >         print $s @_; > > This eliminates the warning message and gives me a mean

Re: how to trap print() errors?

2011-01-16 Thread David Christensen
ts printed: print() on unopened filehandle NOSUCH at trap-print-errors2.pl line 12. And $! isn't very meaningful: trapped error Bad file descriptor at trap-print-errors2.pl line 12. 2. The warnings pragmatic module has an option for turning warnings into errors: use warning

Re: how to trap print() errors?

2011-01-16 Thread Sisyphus
- Original Message - From: "David Christensen" $ cat trap-print-errors.pl #!/usr/bin/perl use strict; use warnings; $| = 1; sub myprint($@) { my $s = shift; eval { ### circumvent Can't use string ("*STDOUT") as a symbol ref... no strict 'refs'; print $s @_; Replace the ab

how to trap print() errors?

2011-01-16 Thread David Christensen
beginners: I'm trying to catch errors when I call print() using a variable containing a string with a bad IO handle (and/or glob?) name. eval() doesn't seem to work: 2011-01-16 14:19:56 dpchrist@p43400e ~/sandbox $ cat trap-print-errors.pl #!/usr/bin/perl use strict; use warnin

Re: How to avoid Out of Memory Errors when dealing with a large XML file?

2011-01-15 Thread Saqib Ali
Thanks! This workaround worked for me. :) :) - Saqib On Tue, Jan 11, 2011 at 8:26 AM, Bob McConnell wrote: > From: Saqib Ali > > > I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser() > > > > I keep getting this error: > > > > "Callback called exit at XML/XPath/Node/Element.pm

Re: How to avoid Out of Memory Errors when dealing with a large XML file?

2011-01-14 Thread Jenda Krynicky
From: Saqib Ali > I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser() > > I keep getting this error: > > "Callback called exit at XML/XPath/Node/Element.pm at line 144 during > global destruction." > > I'm using Windows XP. So I watched the task-management memory meter > during t

RE: How to avoid Out of Memory Errors when dealing with a large XML file?

2011-01-11 Thread Bob McConnell
From: Saqib Ali > I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser() > > I keep getting this error: > > "Callback called exit at XML/XPath/Node/Element.pm at line 144 during > global destruction." > > I'm using Windows XP. So I watched the task-management memory meter > during t

How to avoid Out of Memory Errors when dealing with a large XML file?

2011-01-11 Thread Saqib Ali
Hi. I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser() I keep getting this error: "Callback called exit at XML/XPath/Node/Element.pm at line 144 during global destruction." I'm using Windows XP. So I watched the task-management memory meter during the execution of this process.

Re: Syntax Errors

2010-12-27 Thread Erez Schatz
On 12/27/2010 06:11 AM, Sisyphus wrote: > > - Original Message - From: "Randal L. Schwartz" > > To: > Sent: Monday, December 27, 2010 1:57 PM > Subject: Re: Syntax Errors > > >>>>>>> "Bill" == Bill Casey

Re: Syntax Errors

2010-12-26 Thread Sisyphus
- Original Message - From: "Randal L. Schwartz" To: Sent: Monday, December 27, 2010 1:57 PM Subject: Re: Syntax Errors "Bill" == Bill Casey writes: Bill> Syntax error at import_track.pl line 11, near ") {" Bill> Syntax error at import_trac

Re: Syntax Errors

2010-12-26 Thread Randal L. Schwartz
>>>>> "Sheppy" == Sheppy R writes: Sheppy> Strawberry Perl under Padre on a Windows system will give Syntax errors Sheppy> (Running from both the command-line and in Padre itself). Chances are this Sheppy> is where Bill is getting them from, probably just one

Re: Syntax Errors

2010-12-26 Thread Sheppy R
Strawberry Perl under Padre on a Windows system will give Syntax errors (Running from both the command-line and in Padre itself). Chances are this is where Bill is getting them from, probably just one of the differences between *nix and Windows. @Bill - I'm not seeing any problems when I

Re: Syntax Errors

2010-12-26 Thread Randal L. Schwartz
>>>>> "Bill" == Bill Casey writes: Bill> Syntax error at import_track.pl line 11, near ") {" Bill> Syntax error at import_track.pl line 14, near "}" Perl doesn't ever say "syntax error". So those errors are not coming fr

Re: Syntax Errors

2010-12-19 Thread Shlomi Fish
On Sunday 19 December 2010 22:23:15 Bill Casey wrote: > Hi > > Below is a Perl script which won't compile. My operating system is > Windows XP Home and Perl version is 5.10.1.3. > This script after I placed it in a file compiles fine here: {{{ shlomif:~$ cat test.pl #!/usr/bin/perl # import_tr

Syntax Errors

2010-12-19 Thread Bill Casey
Hi Below is a Perl script which won't compile. My operating system is Windows XP Home and Perl version is 5.10.1.3. #!/usr/bin/perl # import_track.prl use warnings; use strict; open (INFILE, "track.txt") or die $!; open (OUTFILE, ">outtrack.plt") or die $!; my $outstring; while () {

Re: two errors

2010-10-29 Thread Pau Marc Munoz Torres
ulti/auto/Algo > > rithm/SVMLight/SVMLight.so: undefined symbol: set_learning_defaults > > > > I would appreciate is some of you could tell me what does "symbol lookup > > error" and "undefined symbol" means, by the way, set_learning_defaults > is > >

Re: two errors

2010-10-29 Thread Shlomi Fish
On Thursday 28 October 2010 16:04:19 Pau Marc Munoz Torres wrote: > Hi every body > > recently i compiled a svmlight perl module two use svmlight program with > perl > > http://search.cpan.org/~kwilliams/Algorithm-SVMLight-0.09/lib/Algorithm/SVM > Light.pm > > to compile a patch is needed and a

Re: two errors

2010-10-29 Thread Shlomi Fish
error" and "undefined symbol" means, by the way, set_learning_defaults is > deffined at the patch These are errors of the GNU linker. I don't know what is causing them but we can try to investigate. Maybe the set_learn

two errors

2010-10-28 Thread Pau Marc Munoz Torres
Hi every body recently i compiled a svmlight perl module two use svmlight program with perl http://search.cpan.org/~kwilliams/Algorithm-SVMLight-0.09/lib/Algorithm/SVMLight.pm to compile a patch is needed and as i wanted to run it under linux in a 64 bits machine, i used the flag make " CFLAGS=

Re: Perl rounding errors?

2010-04-29 Thread Uri Guttman
> "RC" == Rob Coops writes: RC> On Tue, Apr 27, 2010 at 9:16 AM, Uri Guttman wrote: RC> so you can't tell the difference without getting into the guts RC> with xs or some special code. you mention a receiving program RC> which may make a difference but again perl won't k

Re: Perl rounding errors?

2010-04-29 Thread Rob Coops
On Tue, Apr 27, 2010 at 9:16 AM, Uri Guttman wrote: > > "RC" == Rob Coops writes: > > RC> @Uri, returning 0 or 0.00 does make a small difference in that the > RC> receiving program likes the 0.00 better then the plain 0 don't ask > RC> me why ask our mainframe colleagues why. I wish I cou

Re: Perl rounding errors?

2010-04-29 Thread Uri Guttman
> "RC" == Rob Coops writes: RC> @Uri, returning 0 or 0.00 does make a small difference in that the RC> receiving program likes the 0.00 better then the plain 0 don't ask RC> me why ask our mainframe colleagues why. I wish I could let perl RC> do the work for me but it simply does not

Re: Perl rounding errors?

2010-04-27 Thread Rob Coops
ction system >> is >> outside of my control and getting a module installed can take days if not >> longer due to processes procedures forms and so on. The country has only a >> few days left till the end of the month by which time this should >> absolutely >>

Re: Perl rounding errors?

2010-04-26 Thread Marilyn Sander
On Apr 26, 2010, at 11:22 AM, Uri Guttman wrote: >>>>>> "JWK" == John W Krahn writes: > > i must have not see the OP's reply yet so this is mostly for him. > >>> This is the routine as it looks now (I would be happy to hear about errors &g

Re: Perl rounding errors?

2010-04-26 Thread Uri Guttman
>>>>> "JWK" == John W Krahn writes: i must have not see the OP's reply yet so this is mostly for him. >> This is the routine as it looks now (I would be happy to hear about errors >> or improvements that you might see) >> sub round {

Re: Perl rounding errors?

2010-04-26 Thread John W. Krahn
so on. The country has only a few days left till the end of the month by which time this should absolutely be working. This is the routine as it looks now (I would be happy to hear about errors or improvements that you might see) sub round { my $number = shift; if ( $number == 0 ) { return 0

Re: Perl rounding errors?

2010-04-26 Thread Rob Coops
t; > > cent or even 3 cents if there are lots of elements. Going over the > logic > > > I ran into this problem. > > > > > > Cany anyone advise me how to deal with this as I need to find a way to > > > round correctly in all cases not just in cases wher

Re: Perl rounding errors?

2010-04-26 Thread Shlomi Fish
to find a way to > > round correctly in all cases not just in cases where Perl decides it is a > > good idea to do so. :-) > > The problem is likely caused by the fact that floating-point numbers in > most modern computers are represented by using binary digits (and binary > fra

Re: Perl rounding errors?

2010-04-26 Thread Owen
> Hi list, > > I am just wondering if I sumbled upon an error in perl an error in my > logic > or somehtign else see the below perl one liners > > $ perl -e '$n = 0.945; $r = sprintf("%.2f", $n); print "$r\n";' > 0.94 > > $ perl -e '$n = 0.9451; $r = sprintf("%.2f", $n); print "$r\n";' > 0.95 > >

AW: Perl rounding errors?

2010-04-26 Thread Thomas Bätzler
Rob Coops asked: > I am just wondering if I sumbled upon an error in perl an error in my > logic or somehtign else see the below perl one liners > > $ perl -e '$n = 0.945; $r = sprintf("%.2f", $n); print "$r\n";' > 0.94 Short answer: You shouldn't use floating point numbers for financial calcul

Re: Perl rounding errors?

2010-04-26 Thread Shlomi Fish
ran into this > problem. > > Cany anyone advise me how to deal with this as I need to find a way to > round correctly in all cases not just in cases where Perl decides it is a > good idea to do so. :-) > The problem is likely caused by the fact that floating-point numbers in

Perl rounding errors?

2010-04-26 Thread Rob Coops
Hi list, I am just wondering if I sumbled upon an error in perl an error in my logic or somehtign else see the below perl one liners $ perl -e '$n = 0.945; $r = sprintf("%.2f", $n); print "$r\n";' 0.94 $ perl -e '$n = 0.9451; $r = sprintf("%.2f", $n); print "$r\n";' 0.95 $ perl -e '$n = 0.9450;

Re: Is there any method to tell different between warning and errors?

2010-04-20 Thread Shawn H Corey
n what are the criteria that separates the warnings from the errors? Once you know that, you can write a filter to remove them. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the

AW: Is there any method to tell different between warning and errors?

2010-04-19 Thread Thomas Bätzler
Jeff Pang wrote: > On Tue, Apr 20, 2010 at 1:28 PM, Weizhong Dai > wrote: > > Hi all, > > In my script, I have a system call, and redirect the stderr to a > file. > >        # > >        # open STDERR, ">$workpath\\error_log.txt"; > >        # system "..."; > >        # > > but I only want the E

Re: Is there any method to tell different between warning and errors?

2010-04-19 Thread Jeff Pang
On Tue, Apr 20, 2010 at 1:28 PM, Weizhong Dai wrote: > Hi all, > In my script, I have a system call, and redirect the stderr to a file. >        # >        # open STDERR, ">$workpath\\error_log.txt"; >        # system "..."; >        # > but I only want the ERROR messages to be logged in the file.

Is there any method to tell different between warning and errors?

2010-04-19 Thread Weizhong Dai
Hi all, In my script, I have a system call, and redirect the stderr to a file. # # open STDERR, ">$workpath\\error_log.txt"; # system "..."; # but I only want the ERROR messages to be logged in the file. Is there any method to filter the WARNING messages generated by

Re: Don't understand the errors

2009-10-19 Thread reader
"John W. Krahn" writes: >> I'm on a single user machine at home. I'm thinking I could just write >> to /tmp/BashHistoryDeDup.tmp with the `>' flag, overwriting on each >> run and forget unlinking > > That could be a security hole. Even though you have a single user > machine it is always best p

Re: Don't understand the errors

2009-10-19 Thread Dermot
2009/10/19 Harry Putnam : > >>> use File::Copy; > > Dermot commented: >> It might be best to put this at the top of your script with all the >> other loadable modules your using. > > Harry asks: > Do you think it would make a difference in how the script behaves? Or > do you mean for the sake of g

Re: Don't understand the errors

2009-10-18 Thread John W. Krahn
Harry Putnam wrote: "John W. Krahn" writes: Harry Putnam wrote: I'm not sure what these errors are telling me. The script is supposed to remove dups from .bash_history Wouldn't it be simpler to set HISTCONTROL to ignoredups: export HISTCONTROL=ignoredups Or:

Re: Don't understand the errors

2009-10-18 Thread Harry Putnam
"John W. Krahn" writes: > Harry Putnam wrote: >> I'm not sure what these errors are telling me. >> >> The script is supposed to remove dups from .bash_history > > Wouldn't it be simpler to set HISTCONTROL to ignoredups: > > export HISTCONTROL

Re: Don't understand the errors

2009-10-18 Thread Harry Putnam
27;t really clear what they are suggesting here: (From perldoc File::Temp.. when the notes about OOp usage start) [...] Object interface: require File::Temp; use File::Temp (); [...] I even remember thinking, when I looked it up with perldoc, that I might be get

Re: Don't understand the errors

2009-10-18 Thread John W. Krahn
Harry Putnam wrote: I'm not sure what these errors are telling me. The script is supposed to remove dups from .bash_history Wouldn't it be simpler to set HISTCONTROL to ignoredups: export HISTCONTROL=ignoredups Or: export HISTCONTROL=ignoreboth but not operate on the las

  1   2   3   4   5   >