Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-15 Thread Tetsuo Handa
On 2018/11/15 9:27, sisyphus wrote: > Are you actually encountering files larger than 1e15 bytes ? On 32bit kernels, filesystems would not allow such large files. For example, max size for xfs filesystem is 16TB. Even on 64bit userspace, nobody will want to upload such large file via network. >

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-15 Thread Tetsuo Handa
I received a comment from Peter John Acklam (current bigint maintainer). Forwarded Message Date: Wed, 14 Nov 2018 20:08:27 +0100 Hello This has actually nothing to do with Math::BigInt. The issue here is that the conversion "u", converts a number to an unsigned integer before t

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-14 Thread sisyphus
On Thu, Nov 15, 2018 at 1:49 AM Tetsuo Handa < penguin-ker...@i-love.sakura.ne.jp> wrote: > 32bits userspace on 64bits kernel: > # truncate -s 9223372036854775807 test > # perl -e 'use File::stat; my $sb = lstat("test"); printf("%s\n", $sb->size);' > 9.22337203685478e+18 > # perl -e 'use File::sta

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-14 Thread Tetsuo Handa
On 2018/11/14 21:46, sisyphus wrote: > On Wed, Nov 14, 2018 at 10:20 PM Tetsuo Handa > wrote: > >> Even on 32bit environments (at least for Linux), lstat() calls 64bit version > Here is some test results on Linux. 32bits userspace on 32bits kernel: # truncate -s 17592186044415 test # perl -e

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-14 Thread sisyphus
On Wed, Nov 14, 2018 at 10:20 PM Tetsuo Handa < penguin-ker...@i-love.sakura.ne.jp> wrote: > Even on 32bit environments (at least for Linux), lstat() calls 64bit version When I check on Windows, I find that the value is actually an NV (not an IV as I had expected). I expect it's the same for you,

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-14 Thread Tetsuo Handa
On 2018/11/14 19:59, sisyphus wrote: > On Wed, Nov 14, 2018 at 9:08 PM Tetsuo Handa > wrote > >> how can I pass $sb->size to Math::BigInt->new() as a string (assuming that >> $sb->size is an integer) ? > > To answer the question, you can do: > > my $x = $sb->size; > $value = Math::BigInt->ne

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-14 Thread sisyphus
On Wed, Nov 14, 2018 at 9:08 PM Tetsuo Handa < penguin-ker...@i-love.sakura.ne.jp> wrote > how can I pass $sb->size to Math::BigInt->new() as a string (assuming that $sb->size is an integer) ? To answer the question, you can do: my $x = $sb->size; $value = Math::BigInt->new("$x"); But doing so

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-14 Thread Tetsuo Handa
Hello, sisyphus. Thank you for your answer. > That can fail if $value is so big that it requires more than 15 decimal > digits to express it accurately. I want to use like (...snipped...) my $sb = lstat($file) || next; next unless (S_ISREG($sb->mode) && $sb->size); (...snipped...) $cu

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-13 Thread sisyphus
On 11/13/2018 8:07 AM, Tetsuo Handa wrote: > Hello. > > I want to represent up to a few hundreds gigabytes for file size. > > On 32bits platform, I noticed that > >my $value = ...; >printf("%u\n", $value); > > prints 4294967295 if $value >= 4294967295 whereas > >my $value = ...; >pr

Re: Strange behavior when printing a 4G+ integer on 32bits platform.

2018-11-13 Thread Mike Flannigan
I don't have an answer for you, but I find this interesting.  I note the same issue in 64bit up near 18446744073709551615 I'm guessing the guy who wrote Math::BigInt may have the answer. Mike On 11/13/2018 8:07 AM, Tetsuo Handa wrote: Hello. I want to represent up to a few hundreds gigaby

Re: Strange HASH(0x2ced735) values

2017-02-22 Thread Superior Shelving
> On Feb 21, 2017, at 8:34 AM, Uri Guttman wrote: > > you can't trace it from the value. but you can write code where that value is > stuffed into the db and look for a reference vs 1 or a blank. then you can > dump the call stack (with caller()) or do other debugging. something is > putting a

Re: Strange HASH(0x2ced735) values

2017-02-21 Thread SSC_perl
> On Feb 21, 2017, at 2:34 PM, Sam wrote: > > One can also turn on the DBI trace log as well. Thanks, Sam! That helped a lot. Now I know which subs are involved in creating the SQL so I’m much closer to tracking this down. This is why they say that two heads are better than o

Re: Strange HASH(0x2ced735) values

2017-02-21 Thread Sam
On 02/21/2017 04:12 PM, David Precious wrote: On Tue, 21 Feb 2017 09:11:10 -0800 SSC_perl wrote: On Feb 21, 2017, at 8:34 AM, Uri Guttman wrote: you can't trace it from the value. but you can write code where that value is stuffed into the db and look for a reference vs 1 or a blank. then yo

Re: Strange HASH(0x2ced735) values

2017-02-21 Thread Uri Guttman
On 02/21/2017 05:12 PM, David Precious wrote: On Tue, 21 Feb 2017 09:11:10 -0800 SSC_perl wrote: On Feb 21, 2017, at 8:34 AM, Uri Guttman wrote: you can't trace it from the value. but you can write code where that value is stuffed into the db and look for a reference vs 1 or a blank. then yo

Re: Strange HASH(0x2ced735) values

2017-02-21 Thread David Precious
On Tue, 21 Feb 2017 09:11:10 -0800 SSC_perl wrote: > > On Feb 21, 2017, at 8:34 AM, Uri Guttman > > wrote: > > > > you can't trace it from the value. but you can write code where > > that value is stuffed into the db and look for a reference vs 1 or > > a blank. then you can dump the call stack

Re: Strange HASH(0x2ced735) values

2017-02-21 Thread SSC_perl
> On Feb 21, 2017, at 8:34 AM, Uri Guttman wrote: > > you can't trace it from the value. but you can write code where that value is > stuffed into the db and look for a reference vs 1 or a blank. then you can > dump the call stack (with caller()) or do other debugging. something is > putting a

Re: Strange HASH(0x2ced735) values

2017-02-21 Thread Uri Guttman
On 02/21/2017 11:28 AM, SSC_perl wrote: In a MySQL db I have a `customers` table with a field called `hide`. There are some strange values that I’d like to know where they’re coming from. In most records `hide` is blank, some others have the value ‘1’, but a handful have values like

Re: Strange

2015-06-12 Thread Chankey Pathak
I don't think this mailing list is inactive, perhaps Perl folks are facing less problems and enjoying the weekend! On Fri, Jun 12, 2015 at 5:04 PM, Shawn H Corey wrote: > On Fri, 12 Jun 2015 07:43:59 +0200 > Jerry Rocteur wrote: > > > What happened to the list ? Where has everybody gone to ? >

Re: Strange

2015-06-12 Thread Shawn H Corey
On Fri, 12 Jun 2015 07:43:59 +0200 Jerry Rocteur wrote: > What happened to the list ? Where has everybody gone to ? stackoverflow.com -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@per

Re: Strange

2015-06-12 Thread Andrew Solomon
My theory is that the silence is on account of the nice weather. On Fri, Jun 12, 2015 at 7:22 AM, wrote: > This is still a very active list. I almost want to unsubscribe it's so > active. > > Sent from my buttPhone. > > > On Jun 12, 2015, at 1:43 AM, Jerry Rocteur wrote: > > > > Hi, > > > > Wha

Re: Strange

2015-06-11 Thread ekimdunaway
This is still a very active list. I almost want to unsubscribe it's so active. Sent from my buttPhone. > On Jun 12, 2015, at 1:43 AM, Jerry Rocteur wrote: > > Hi, > > What has happened to this mailing list ? > > This list was great with lots of smart people answering all sorts of > questions

Re: Strange use of => ?

2012-05-11 Thread Jim Gibson
On May 11, 2012, at 7:39 PM, Owen wrote: > I found this on the internet to convert an IPv4 address (w.x.y.z) to > a decimal number. > > w * 16,777,216 + x * 65,536 + y * 256 + z = decimalNumber > > I then found the subroutine, ip2dec in the script below. > > The script works, that's not my pro

RE: Strange behaviour while using DBI with binding

2010-08-19 Thread Babale Fongo
tman; beginners@perl.org => Subject: Re: Strange behaviour while using DBI with binding => => On Wed, Aug 18, 2010 at 19:55, Babale Fongo => wrote: => snip => > In the first example, DBI always passed the value for offset and => ignored the => > second value after the c

Re: Strange behaviour while using DBI with binding

2010-08-19 Thread Dr.Ruud
Babale Fongo wrote: 2) This works fine (with or without space in the string). my $sth = $dbh->prepare(qq{ Select fname, lname, dob, substr(desc, 1, 200) from user left join personal_data on user.id = personal_data.id where gender = ? and position = ? order by lname limit $l

Re: Strange behaviour while using DBI with binding

2010-08-19 Thread Chas. Owens
On Wed, Aug 18, 2010 at 19:55, Babale Fongo wrote: snip > In the first example, DBI always passed the value for offset and ignored the > second value after the comma. > > I'm now using the second code as it works without problem even if string > contains space. I just need to understand why DBI be

Re: Strange behaviour while using DBI with binding

2010-08-19 Thread Robert Wohlfarth
On Wed, Aug 18, 2010 at 6:55 PM, Babale Fongo wrote: > Below are 2 pieces of code. Both have been tested with space in the string > and again without space. > > $limit = "$offset,$number_rows" or $limit = "$offset, $number_rows"; > > [snip...] > > 2) This works fine (with or without space in the

RE: Strange behaviour while using DBI with binding

2010-08-18 Thread Babale Fongo
>From your last comments, I am not sure where this is leading to, but here is all I have to say. Below are 2 pieces of code. Both have been tested with space in the string and again without space. $limit = "$offset,$number_rows" or $limit = "$offset, $number_rows"; 1) This does not work (with

Re: Strange behaviour while using DBI with binding

2010-08-18 Thread Uri Guttman
> "MC" == Mimi Cafe writes: MC> You asked why I am concatenating the 2 scalars, comma and the space below? MC> my $limit = "$offset" . ', ' . "$number_rows"; MC> I agree your suggestion below should work as well, but I was desperate to find the error, so I tried several option to se

RE: Strange behaviour while using DBI with binding

2010-08-18 Thread Mimi Cafe
1 17 Query SELECT fname, lname, dob, substr(desc, 1, 200) FROM user LEFT JOIN personal_data ON user.id = personal_data.id WHERE gender = 'male' and position = 'HR Admin' order by lname LIMIT 20 Quit => -Original Message----- => F

Re: Strange behaviour while using DBI with binding

2010-08-17 Thread Uri Guttman
> "MC" == Mimi Cafe writes: MC> I experienced a strange behaviour while using DBI binding for MySQL query MC> with LIMIT clause. My CGI program behaved so strange and the result was MC> always unpredictable and it took me several hours before I finally detected MC> the problem.

Re: Strange compilation error.

2010-05-14 Thread John W. Krahn
Meghanand Acharekar wrote: Hello, Hello, I have written following perl code to sort file in subfolders according to regex matching I don't see any regular expressions in the code you provided? its giving me following error while compiling the code. Global symbol "@i" requires explicit pa

Re: Strange compilation error.

2010-05-14 Thread Shlomi Fish
On Friday 14 May 2010 11:58:36 Meghanand Acharekar wrote: > Hello, > > I have written following perl code to sort file in subfolders according to > regex matching its giving me following error > while compiling the code. > > Global symbol "@i" requires explicit package name at sortfiles.pl line 2

Re: Strange Error

2010-04-19 Thread Mike Blezien
- From: "Jim Gibson" To: "Perl List" Sent: Monday, April 19, 2010 4:14 PM Subject: Re: Strange Error On 4/19/10 Mon Apr 19, 2010 11:07 AM, "Mike Blezien" scribbled: Hello, I'm getting a strange error and for the life of me can't figure out what ca

Re: Strange Error

2010-04-19 Thread Jim Gibson
On 4/19/10 Mon Apr 19, 2010 11:07 AM, "Mike Blezien" scribbled: > Hello, > > I'm getting a strange error and for the life of me can't figure out what > causing it. All that's in the error log is the following: > > [Mon Apr 19 13:01:37 2010] index.cgi: Invalid offset: 1 > > Would anyone have

Re: Strange behavior with POSIX qw(fpathconf)

2010-03-31 Thread Bob goolsby
Post this on Perl Monks (http://perlmonks.org/) for non-beginner feed back, Old Gray Bear On Tue, Mar 30, 2010 at 2:38 PM, Paul Smith wrote: > I have a feeling this is not a "beginners" question (I've been hacking > in Perl for many years and UNIX systems for far longer) but it seems my > choice

Re: Strange Data space wipe out with hashes

2009-09-17 Thread Uri Guttman
> "JR" == Jerry Rocteur writes: JR> my %sib_master_hoa = ( JR> => [ ' ' ] , JR> _ERSALL => [ ' ', 'ERS CRCODOSS ', 'ERS ENVDOSS ', 'ERS ENVVAL ' ], JR> _ERSOTHERS => [ ' ', 'ERS CRCODOSS ', 'ERS ENVVAL ' ], JR> );

Re: Strange Data space wipe out with hashes

2009-09-17 Thread Shawn H Corey
Jerry Rocteur wrote: Hi, I came across this problem and thought I'd run it by the list so that perhaps someone can explain to me what is going on Given a script with the following hash definition #!/usr/bin/perl use warnings; use strict; my %sib_master_hoa = ( => [

Re: Strange regular expression

2009-03-15 Thread Chas. Owens
On Mon, Mar 16, 2009 at 01:39, boll wrote: > I'm trying to use the random_image.pl program from the nms-cgi project on > sourceforge.net. > > This line has me baffled: >        if ( $baseurl !~ m%/$% ) > > > I don't understand the function of the percent symbols. I hope someone can > explain what

Re: Strange regular expression

2009-03-15 Thread Owen
> I'm trying to use the random_image.pl program from the nms-cgi project > on sourceforge.net. > > This line has me baffled: > > if ( $baseurl !~ m%/$% ) > > > I don't understand the function of the percent symbols. > I hope someone can explain what it's doing. you can define matching crite

Re: Strange problem with substr() function and right aligned fields

2009-03-05 Thread Jenda Krynicky
From: "Bill Harpley" > My Comment: this is an obvious approach, with numerous advantages. > However, it requires installation of the BD:Oracle module, which can be > very tricky. > Basically, I started to install and configure all of this (Perl, > DBI,DB:Oracle) on HP-UX 11.31 but after 4 days I

Re: Strange problem with substr() function and right aligned fields

2009-03-05 Thread Jenda Krynicky
From: "Bill Harpley" > I must process the output of an SQL query using Perl. > > I know the column position of the data in the output file, which means > that I am able to calculate the width of each field. > > All of the data in the file is left-aligned to the field, except for one > column. >

Re: Strange problem with substr() function and right aligned fields

2009-03-03 Thread John W. Krahn
Bill Harpley wrote: I must process the output of an SQL query using Perl. I know the column position of the data in the output file, which means that I am able to calculate the width of each field. All of the data in the file is left-aligned to the field, except for one column. Basically, in t

Re: strange string match

2009-02-15 Thread John W. Krahn
org chen wrote: Hi, Hello, I am coding a script to read a pure txt fiel and show it. I can't understand why any lines in the file match the word of "[DIED]". Thanks Org the txt file is like this: Fri Feb 13 14:31:26 2009 [PROCESS]: Welcom

RE: strange string match -- thanks

2009-02-15 Thread org chen
Dear Chas, Thanks so much, The problem fixed now. It has annoyed me for two days. Cheers Org > Date: Sun, 15 Feb 2009 20:56:51 -0500> Subject: Re: strange string match> > From: chas.ow...@gmail.com> To: org.c...@live.com.au> CC: beginners@perl.org> > > On Sun,

Re: strange string match

2009-02-15 Thread Gunnar Hjalmarsson
[ Please post from an email client/service that preserves newlines. ] org chen wrote: I am coding a script to read a pure txt fiel and show it. I can't understand why any lines in the file match the word of "[DIED]". Probably because of the typo I pointed out below. while(my $line =

Re: strange string match

2009-02-15 Thread Chas. Owens
On Sun, Feb 15, 2009 at 20:32, org chen wrote: snip >while(my $line = <>){chomp( $line ); > print "current line is $line"; >if($line =~ /^[Mon|Tue|Wed|Thu|Wed|Fri|Sat|Sun]/){ >#push old data into array

Re: strange issue while using DBI module

2008-08-13 Thread Mr. Shawn H. Corey
On Wed, 2008-08-13 at 02:32 -0700, Debraj wrote: > Hi > > The script ( mentioned below ) works fine if I do a > > setenv LD_LIBRARY_PATH /OracleProd/oracle9i/lib/ > > before executing the script. But if I don't do that instead put it > within the script like : > > > $ENV{'LD_LIBRARY_PATH'} = "

Re: Strange sorting, need some help

2008-07-21 Thread Gunnar Hjalmarsson
Amit Saxena wrote: On Mon, Jul 21, 2008 at 2:11 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: If you were using the <=> operator to compare non-numeric strings you would get a warning, but any scalar value is a valid string so you will get no warnings if you compare numeric values with the cmp oper

Re: Strange sorting, need some help

2008-07-21 Thread Amit Saxena
On Mon, Jul 21, 2008 at 2:11 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Tobias Eichner wrote: > > > > I'm currently dealing with a sample program I try to understand. Here it > is: > > > > --- > > > > #!/usr/bin/perl > > > > use strict; use warnings; use diagnostics; > > > > # Array to sort > >

Re: Strange sorting, need some help

2008-07-20 Thread Rob Dixon
Tobias Eichner wrote: > > I'm currently dealing with a sample program I try to understand. Here it is: > > --- > > #!/usr/bin/perl > > use strict; use warnings; use diagnostics; > > # Array to sort > my @unsortiert = qw(Z A z a 19 91); > > # Print array to sort > print "@unsortiert"; print "

Re: Strange Behaviour while string concatenation

2008-02-12 Thread Chas. Owens
On Feb 12, 2008 5:51 AM, Rajpreet <[EMAIL PROTECTED]> wrote: > Greetings, > > I am trying to append an alphabetical counter to a string. But > concatenation shows a very strange behaviour in this case. Can some > one please help? > > The piece of code looks like : > > $self->{"log"}->debug(" In Fun

Re: Strange interaction of "my"-variables with initialization

2008-01-14 Thread Dr.Ruud
Peter Daum schreef: > my $x = undef; > foreach ( qw(a b c) ) { > my $t = $x if $x; > warn( "\$t == ", $t||'undef', "\n" ); > $t = $_; > } > > $t would be initialized with the value of $x if that was true; > otherwise (at least that's what I would expect) $t should be > undefined, > so

Re: Strange interaction of "my"-variables with initialization

2008-01-13 Thread John W. Krahn
Chas. Owens wrote: On Jan 13, 2008 1:20 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: snip Statements don't define scope, braces and files define scope. snip so why should you be able to use it because it has been changed to this my $t = $x if $x; print "$t\n"; You can use it because it is i

Re: Strange interaction of "my"-variables with initialization

2008-01-13 Thread Chas. Owens
On Jan 13, 2008 1:20 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > Statements don't define scope, braces and files define scope. snip > > so why should you be able to use it because it has been changed to this > > > > my $t = $x if $x; > > print "$t\n"; > > You can use it because it is in th

Re: Strange interaction of "my"-variables with initialization

2008-01-13 Thread John W. Krahn
Chas. Owens wrote: On Jan 13, 2008 6:22 AM, Peter Daum <[EMAIL PROTECTED]> wrote: snip my $t =$x if $x; snip $t would be initialized with the value of $x if that was true; otherwise (at least that's what I would expect) $t should be undefined, so the result would be as before. The real out

Re: Strange interaction of "my"-variables with initialization

2008-01-13 Thread Chas. Owens
On Jan 13, 2008 6:22 AM, Peter Daum <[EMAIL PROTECTED]> wrote: snip > my $t =$x if $x; snip > $t would be initialized with the value of $x if that was true; > otherwise (at least that's what I would expect) $t should be undefined, > so the result would be as before. The real outcome, however, i

Re: Strange interaction of "my"-variables with initialization

2008-01-13 Thread John W. Krahn
Peter Daum wrote: Hi, Hello, I just got bitten by a very simple issue, where Perl behaves totally different from what I had expected; According to the documentation, lexical variables are visible only after the line they have been declared in; they may be initialized; otherwise their value i

Re: Strange debugging question...

2007-09-29 Thread Dr.Ruud
"Zachary Shay" schreef: > Is there any way to get the name of a variable by knowing its memory > address? Do you consider its ref-value as its memory address? -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: Strange debugging question...

2007-09-27 Thread [EMAIL PROTECTED]
On Sep 27, 6:11 pm, [EMAIL PROTECTED] (Zachary Shay) wrote: > Is there any way to get the name of a variable by knowing its memory > address? Not in general in a reasonable time. Anyhow, how would you know the address of a variable in Perl? What do you mean by "the name"? An SV in Perl can have

Re: Strange debugging question...

2007-09-27 Thread Paul Johnson
On Thu, Sep 27, 2007 at 01:11:11PM -0400, Zachary Shay wrote: > Is there any way to get the name of a variable by knowing its memory > address? Some hairy XS might get you an 80% solution, but in general, no. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [

Re: Strange error

2007-09-26 Thread Caronte
On 25 Set, 12:37, [EMAIL PROTECTED] (Matthew Whipple) wrote: > Some suggestions: > rewrite ':standard'; as qw/:standard/; > use warnings; > check the web server error log for more verbose debugging information > > It would be a lot easier to diagnose if you know what file or director

Re: Strange error

2007-09-26 Thread [EMAIL PROTECTED]
On Sep 24, 9:17 pm, [EMAIL PROTECTED] (Caronte) wrote: > Hi everybody. I'm learning Perl and CGI programming using MAMP as web- > server on OSX and I can't use the standard CGI module. Look at this > (very) simple script: > > #!/usr/local/bin/perl First obvious question, is that the correct path?

Re: Strange error

2007-09-25 Thread Matthew Whipple
Some suggestions: rewrite ':standard'; as qw/:standard/; use warnings; check the web server error log for more verbose debugging information It would be a lot easier to diagnose if you know what file or directory isn't being found/accessed. Caronte wrote: Hi everybody. I'm

Re: Strange error

2007-09-25 Thread Ken Foskey
> 500 Server Error > [Mon Sep 24 21:00:38 2007] [error] [client ::1] (2)No such file or > directory: exec of '/Applications/MAMP/cgi-bin/backatcha-cgi' failed > [Mon Sep 24 21:00:38 2007] [error] [client ::1] Premature end of > script headers: backatcha-cgi Why is there a hyphen not a dot? backat

Re: strange unexpected deadlock

2007-06-25 Thread Michael Scondo
On Saturday 23 June 2007 15:08, Tom Phoenix wrote: > On 6/23/07, Michael Scondo <[EMAIL PROTECTED]> wrote: > > sub thread1{ > > print "1\n"; > > lock $x; > > print "locked x: 1\n"; > > cond_wait $x; > > Can't get past here until $x is

Re: strange unexpected deadlock

2007-06-23 Thread Tom Phoenix
On 6/23/07, Michael Scondo <[EMAIL PROTECTED]> wrote: sub thread1{ print "1\n"; lock $x; print "locked x: 1\n"; cond_wait $x; Can't get past here until $x is signalled by another thread, and unlocked by all other threads.

Re: Strange problem with glob <>

2006-12-28 Thread Madhur Kashyap
Okies... yeah ..later I changed it to glob() and it worked, but I was little bit concerned why it works with switch module. Nevertheless, I have had wierd troubles with Switch module in past ... Thanks Madhur On 12/28/06, Mumia W. <[EMAIL PROTECTED]> wrote: On 12/28/2006 01:42 AM, Madhur Kashy

Re: Strange problem with glob <>

2006-12-28 Thread Mumia W.
On 12/28/2006 01:42 AM, Madhur Kashyap wrote: Hi there, Have a look at these two different implementations. IMPL2 works somehow. The problem I am facing is that the glob <$pat> does not return any value in IMPL1 but it returns in IMPL2. Can somebody tell what could be the problem. [...] Use

Re: Strange problem with glob <>

2006-12-28 Thread Igor Sutton
Hi Madhur, 2006/12/28, Madhur Kashyap <[EMAIL PROTECTED]>: Hi there, Have a look at these two different implementations. IMPL2 works somehow. The problem I am facing is that the glob <$pat> does not return any value in IMPL1 but it returns in IMPL2. Can somebody tell what could be the problem

Re: strange regex problem with backslash and newline

2006-08-05 Thread John W. Krahn
Peter Daum wrote: > Hi, Hello, > when trying to process continuation lines in a file, I ran > into a weird phenomenon that I can't make any sense of: > > $s contains a line read from a file, that ends with a backslash > (+ the newline character), so > > $s='abc \ > '; > > $s =~ /^(.*)$/; print

Re: strange regex problem with backslash and newline

2006-08-05 Thread Peter Daum
Tom Phoenix wrote: > On 8/5/06, Peter Daum <[EMAIL PROTECTED]> wrote: >> $s =~ /^(.*[^\\])(\\)?$/; print "1: '$1', 2: '$2'"; > > Let's see what that pattern matches by annotating it: > > m{ >^ # start of string >( # memory 1 > .*# any ol' junk, including backslashes

Re: strange regex problem with backslash and newline

2006-08-05 Thread Tom Phoenix
On 8/5/06, Peter Daum <[EMAIL PROTECTED]> wrote: $s='abc \ '; $s =~ /^(.*[^\\])(\\)?$/; print "1: '$1', 2: '$2'"; Let's see what that pattern matches by annotating it: m{ ^ # start of string ( # memory 1 .*# any ol' junk, including backslashes [^\\] # any n

Re: strange regex problem with backslash and newline

2006-08-05 Thread D. Bolliger
Peter Daum am Samstag, 5. August 2006 18:45: > Hi, Hallo Peter > when trying to process continuation lines in a file, I ran > into a weird phenomenon that I can't make any sense of: > > $s contains a line read from a file, that ends with a backslash > (+ the newline character), so > > $s='abc \ >

Re: strange errormessage from script run in cron

2006-04-21 Thread Bjørge Solli
On Thursday 20 April 2006 23:31, John W. Krahn wrote: > Bjørge Solli wrote: > > On Thursday 20 April 2006 12:01, John W. Krahn wrote: > >>Bjørge Solli wrote: > >>>I have this as a part of my script: > >>> > >>>$ncfile = `ls -1 $mersea_cat | head -1`; > >>>print $ncfile; > >>> > >>>It prints

Re: strange errormessage from script run in cron

2006-04-20 Thread John W. Krahn
Bjørge Solli wrote: > On Thursday 20 April 2006 12:01, John W. Krahn wrote: >>Bjørge Solli wrote: >>>I have this as a part of my script: >>> >>>$ncfile = `ls -1 $mersea_cat | head -1`; >>>print $ncfile; >>> >>>It prints the desired first file in $mersea_cat, but _before_ that the ls >>>comm

Re: strange errormessage from script run in cron

2006-04-20 Thread Chad Perrin
On Thu, Apr 20, 2006 at 01:34:18PM +0200, Bjørge Solli wrote: > > Still wondering why that errormessage was printed though, but not very > important any more. I'm curious, as well. If someone knows why that happened, I'd like to know. -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]

Re: strange errormessage from script run in cron

2006-04-20 Thread Bjørge Solli
On Thursday 20 April 2006 12:01, John W. Krahn wrote: > Bjørge Solli wrote: > > I have this as a part of my script: > > > > $ncfile = `ls -1 $mersea_cat | head -1`; > > print $ncfile; > > > > It prints the desired first file in $mersea_cat, but _before_ that the ls > > command prints an err

Re: strange errormessage from script run in cron

2006-04-20 Thread John W. Krahn
Bjørge Solli wrote: > I have this as a part of my script: > > $ncfile = `ls -1 $mersea_cat | head -1`; > print $ncfile; > > It prints the desired first file in $mersea_cat, but _before_ that the ls > command prints an errormessage to stderr: > > ls: write error: Broken pipe Why not jus

RE: Strange problem assigning values to strings

2006-03-09 Thread Bisbal, Prentice
Thanks for the tip. That fixed it. Prentice -Original Message- From: Shawn Corey [mailto:[EMAIL PROTECTED] Sent: Thu 3/9/2006 12:27 PM To: Bisbal, Prentice; beginners@perl.org Subject: Re: Strange problem assigning values to strings Bisbal, Prentice wrote: > I think you'

Re: Strange problem assigning values to strings

2006-03-09 Thread Shawn Corey
Bisbal, Prentice wrote: I think you're on to something. This is what the debugger shows: DB<17> x [EMAIL PROTECTED] 0 ARRAY(0x90c420c) 0 "706840\cM" 1 "706846\cM" 2 "715596\cM" 3 "715620\cM" 4 "722292\cM" 5 "722300\cM" 6 "722327\cM" 7 "722330\cM" 8 "722340\c

Re: Strange problem assigning values to strings

2006-03-09 Thread Shawn Corey
Bisbal, Prentice wrote: I've got a strange problem. This perl code has been in use for a long time (6 - 12 mos, at least), and it just started behaving badly the other day. This code: foreach $num (@ids) { $infile = "$tmpdir/lp-$num.mol"; $outfile = "$original_dir/lp-$num.$typ

Re: [RESOLVED (workaround?)] Re: Strange "Can't locate Module.pm in @INC" error after chaning from 'use lib' to PERL5LIB

2006-02-15 Thread Hans Meier (John Doe)
Tom Phoenix am Mittwoch, 15. Februar 2006 01.59: > On 2/14/06, Hans Meier (John Doe) <[EMAIL PROTECTED]> wrote: > > I'm fine with that, but still don't understand how a path present in @INC > > is ignored. > > It sure looks like it's in @INC, from the message. (You may know that > PERL5LIB is somet

Re: [RESOLVED (workaround?)] Re: Strange "Can't locate Module.pm in @INC" error after chaning from 'use lib' to PERL5LIB

2006-02-14 Thread Tom Phoenix
On 2/14/06, Hans Meier (John Doe) <[EMAIL PROTECTED]> wrote: > I'm fine with that, but still don't understand how a path present in @INC is > ignored. It sure looks like it's in @INC, from the message. (You may know that PERL5LIB is sometimes ignored for security reasons, but it's not ignored if

[RESOLVED (workaround?)] Re: Strange "Can't locate Module.pm in @INC" error after chaning from 'use lib' to PERL5LIB

2006-02-14 Thread Hans Meier (John Doe)
Hans Meier (John Doe) am Dienstag, 14. Februar 2006 19.08: > It's very strange: > > My apache doesn't start with > > [error] Can't locate SMF/Config.pm in @INC (@INC contains: /opt/smf/lib > [...]) at /opt/smf/apconf/backend/httpd_startup_smf.pl line 228. > > But why? The file is there: > > # ls /

Re: strange problem with STDIN- need help

2005-12-30 Thread John W. Krahn
Poonam Pahil wrote: > i managed to figure out the cause. > i was undefining $/ .I wanted to use slurping technique.i.e reading in a > small file in a variable & then making the changes. > > Ive now undefined this within a local context. > Its working fine now. > anyone has an idea how this is aff

Re: strange problem with STDIN- need help

2005-12-30 Thread Poonam Pahil
i managed to figure out the cause. i was undefining $/ .I wanted to use slurping technique.i.e reading in a small file in a variable & then making the changes. Ive now undefined this within a local context. Its working fine now. anyone has an idea how this is affecting . I tried using $|=1 but th

RE: strange problem with STDIN- need help

2005-12-29 Thread Timothy Johnson
Try adding this line to the top of your script: $| = 1; This sets STDOUT to autoflush the buffer. You may be trying to print something that just isn't showing up. -Original Message- From: Poonam Pahil [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 2:23 AM To: beginners@pe

Re: strange problem with STDIN- need help

2005-12-29 Thread Dr.Ruud
Poonam Pahil schreef: > Iam using to accept user input but the script just hangs at > that point. perldoc -q waiting -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: strange problem with STDIN- need help

2005-12-29 Thread Owen Cook
On Thu, 29 Dec 2005, Poonam Pahil wrote: > if($remove_CS =~ m/n/i ){ ??? } > it does not reach to this point. > > it hangs before this, at > my $remove_CS = ; > > Well this works for me cut #!/usr/bin/perl -w use strict; print "Do you w

Re: strange problem with STDIN- need help

2005-12-29 Thread Poonam Pahil
if($remove_CS =~ m/n/i ){ ??? } it does not reach to this point. it hangs before this, at my $remove_CS = ; thanks poonam On 12/29/05, Owen Cook <[EMAIL PROTECTED]> wrote: > > > On Thu, 29 Dec 2005, Poonam Pahil wrote: > > > > Iam using to accept user input but the script just hangs at that

Re: strange problem with STDIN- need help

2005-12-29 Thread Owen Cook
On Thu, 29 Dec 2005, Poonam Pahil wrote: > > Iam using to accept user input but the script just hangs at that > point. > I type in the value & program is just stuck at that point. > > i know its got to do with buffer flushing. when iam using the same piece of > code at the beginning of the scri

Re: Strange error: PerlRun

2005-09-28 Thread Jeff Peng
too few info u have given. It seems that u have problem at the interface of cgi script to web server. 2005/9/28, Graeme McLaren <[EMAIL PROTECTED]>: > Afternoon all, I have a strange error: > > [Tue Sep 27 14:43:41 2005] [error] PerlRun: `failed at stage 1: Input/output > error > at /usr/local/lib

Re: strange result with reg exp

2005-09-14 Thread Jeff 'japhy' Pinyan
On Sep 14, Christopher Spears said: In the script I am writing, I use the following regular expression: $pass =~ tr/a-z/A-Z/s; If I give the expression a string like "Occ", then the expression will convert it to "OC" instead of "OCC"! What is going on? It sounds like you're using an operator

Re: strange result with reg exp

2005-09-14 Thread John W. Krahn
Christopher Spears wrote: > In the script I am writing, I use the following > regular expression: > > $pass =~ tr/a-z/A-Z/s; > > If I give the expression a string like "Occ", then the > expression will convert it to "OC" instead of "OCC"! > What is going on? tr/// does NOT use regular expressio

RE: strange result with reg exp

2005-09-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Christopher Spears wrote: > In the script I am writing, I use the following > regular expression: > > $pass =~ tr/a-z/A-Z/s; > > If I give the expression a string like "Occ", then the > expression will convert it to "OC" instead of "OCC"! > What is going on? the /s says to squash ( Progr

Re: strange CGI::Session error

2005-05-14 Thread Octavian Rasnita
- Original Message - > Hi, > > I have tried the following test package: > > package Presa::H; > > use strict; > use warnings; > use diagnostics; > > use CGI (); > use CGI::Session (); > use DBI (); > > my $q = CGI->new(); > my $dbh = DBI->connect("DBI:mysql:database=presa", "root", undef,

Re: strange if-else problem

2005-02-28 Thread Jay
On Mon, 28 Feb 2005 10:07:49 +, Graeme McLaren <[EMAIL PROTECTED]> wrote: > Morning all. I have a strange problem with an if-else statement. Both > parts of the statement are being executed and I have no idea why, the > offending code is this: > > if($password =~ /\S\S\d\d\S\S/){ > #

Re: strange if-else problem

2005-02-28 Thread Marcello
Graeme McLaren ha scritto: Morning all. I have a strange problem with an if-else statement. Both parts of the statement are being executed and I have no idea why, the offending code is this: Try to add two warnings to see if handle_error is called from the "else" branch if this statement or fr

RE: Strange problem with cookie script

2005-02-07 Thread Moon, John
I am getting a strange problem with two cookie scripts I've written. The first, cookie_maker.cgi, creates two cookies containing a user id and a security key: #!/usr/bin/perl -w use strict; # creates cookies print "Set-Cookie:user=cbfb\n"; print "Set-Cookie:secid=1234\n";

Re: Strange Output

2004-12-24 Thread Oliver Schnarchendorf
On Fri, 24 Dec 2004 12:06:00 +0530, Mallik wrote: > total 6 > drwxr-xr-x 2 mkodiche cisco 96 Dec 23 21:54 . > drwxr-xr-x 4 mkodiche cisco 1024 Dec 23 19:36 .. > -rw-r--r-- 1 mkodiche cisco 0 Dec 23 22:34 a.txt > -rwxrwxr-x 1 mkodiche cisco279 Dec 23 22:00 back

  1   2   3   >