[23195] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5416 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 23 21:05:38 2003

Date: Sat, 23 Aug 2003 18:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 23 Aug 2003     Volume: 10 Number: 5416

Today's topics:
        a backreference problem? <geoff.cox@blueyonder.co.uk>
    Re: a backreference problem? <jkeen@concentric.net>
    Re: a backreference problem? <newsfeed@boog.co.uk>
    Re: a backreference problem? (Tad McClellan)
    Re: a backreference problem? (Tad McClellan)
        and/or matching question (Eddie)
    Re: and/or matching question (Tad McClellan)
    Re: Commonly used modules <abigail@abigail.nl>
        csv translators <simonyeats@hotmail.com>
    Re: csv translators (Tad McClellan)
    Re: csv translators <sv99oya02@sneakemail.com>
    Re: csv translators <bwalton@rochester.rr.com>
        embeding tags <jimkey@tds.net>
    Re: embeding tags <abigail@abigail.nl>
    Re: embeding tags <jimkey@tds.net>
    Re: embeding tags <abigail@abigail.nl>
    Re: embeding tags <jimkey@tds.net>
    Re: Perl build script woes doing Source Safe get <abigail@abigail.nl>
    Re: Regular Expression Question <mikeflan@earthlink.net>
    Re: Saving Perl output <flavell@mail.cern.ch>
        Small memory problem (David Morel)
    Re: Small memory problem <rgarciasuarez@free.fr>
    Re: Small memory problem <ndronen@io.frii.com>
    Re: Strange problem with perl-oracle <makbo@pacbell.net>
    Re: Using Sprintf (was Re: Matching FP Numbers and Usin (Tad McClellan)
    Re:  <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 23 Aug 2003 22:53:50 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: a backreference problem?
Message-Id: <haofkv8hcgcsgtqhjv71f073c3ibtu5s97@4ax.com>

Hello,

I can use

$string =~ /="(.*)"\.doc/;
print $1;

which will get "docs/path/word"
from <a href="docs/path/word.doc">link to word doc</a> (A)

But! What if I have a file with say 100 lines similar to A above? How
do I deal with multiple values of $1?

Cheers

Geoff





------------------------------

Date: 23 Aug 2003 22:13:00 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: a backreference problem?
Message-Id: <bi8otc$1ib@dispatch.concentric.net>


"Geoff Cox" <geoff.cox@blueyonder.co.uk> wrote in message
news:haofkv8hcgcsgtqhjv71f073c3ibtu5s97@4ax.com...
> Hello,
>
> I can use
>
> $string =~ /="(.*)"\.doc/;
> print $1;
>
> which will get "docs/path/word"
> from <a href="docs/path/word.doc">link to word doc</a> (A)
>
> But! What if I have a file with say 100 lines similar to A above? How
> do I deal with multiple values of $1?
>
You read the file line by line, testing to see whether you achieved a match
(which you didn't do above), then push each match onto an array or assign it
to an appropriate hash key.




------------------------------

Date: Sun, 24 Aug 2003 00:05:44 +0100
From: "Peter Cooper" <newsfeed@boog.co.uk>
Subject: Re: a backreference problem?
Message-Id: <bi8s16$6n5kg$1@ID-194358.news.uni-berlin.de>

"Geoff Cox" <geoff.cox@blueyonder.co.uk> wrote:
> which will get "docs/path/word"
> from <a href="docs/path/word.doc">link to word doc</a> (A)
>
> But! What if I have a file with say 100 lines similar to A above? How
> do I deal with multiple values of $1?

You can match 'many' things into an array like so:

my $data1 = q{
<a href="docs/path/word.doc">link to word doc</a>
<a href="docs/path/word2.doc">link to word doc</a>
<a href="docs/path/word3.doc">link to word doc</a>
};

(@names) = ($data1 =~ /="(.*?)\.doc"/gsi);
print $_ . "\n" for @names;

However, if you really want to parse HTML, and aren't just using HTML as an
example here, you will want to look into modules which are dedicated to this
purpose. Look at the HTML Parser set at
http://search.cpan.org/author/GAAS/HTML-Parser-3.31/ . HTML::LinkExtor (a
link extractor) may be of particular use to you.

Regards,
Peter Cooper




------------------------------

Date: Sat, 23 Aug 2003 17:23:12 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: a backreference problem?
Message-Id: <slrnbkfqag.42u.tadmc@magna.augustmail.com>

Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:

> I can use
> 
> $string =~ /="(.*)"\.doc/;
> print $1;


Yes, but you shouldn't.

You should never use the dollar-digit variables unless you
have first ensured that the match _succeeded_.


   if ( $string =~ /="(.*)"\.doc/ )
      { print $1 }


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 23 Aug 2003 17:29:15 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: a backreference problem?
Message-Id: <slrnbkfqlr.42u.tadmc@magna.augustmail.com>

Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:


> $string =~ /="(.*)"\.doc/;
                    ^^^
                    ^^^
> which will get "docs/path/word"
        ^^^^^^^^
        ^^^^^^^^ No it won't.


> from <a href="docs/path/word.doc">link to word doc</a> (A)


Your pattern requires a double quote before a dot. 

The string does not contain a double quote before a dot.

The match must fail, and $1 will *not* be set, it will be left
with the same value that it had before the match was attempted.


> But! What if I have a file with say 100 lines similar to A above? How
> do I deal with multiple values of $1?


It depends on what "deal with" means when you say it.

The answer would probably involve one of Perl's looping constructs
and/or aggregate data types.

We would need a better question in order to give a better answer.

If "deal with" means "print dollar one" for instance, then the
answer would be "use a while(<FILE>) loop".


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 23 Aug 2003 11:59:16 -0700
From: sales@detector.com (Eddie)
Subject: and/or matching question
Message-Id: <6a779a0d.0308231059.5c9ef6e5@posting.google.com>

Hi,

On a web form, I have two fields "US_State" and "Other_State".

In my perl script I have....

&no_State unless $FORM{'US_State'};

How do I write it so it says

&no_State unless $FORM{'US_State'} ###AND/OR### $FORM{'Other_State'} ;

Thanks!


------------------------------

Date: Sat, 23 Aug 2003 14:54:32 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: and/or matching question
Message-Id: <slrnbkfhjo.3sr.tadmc@magna.augustmail.com>

Eddie <sales@detector.com> wrote:

> On a web form, I have two fields "US_State" and "Other_State".


You should use CGI.pm for form processing.


> &no_State unless $FORM{'US_State'};
  ^
  ^ lose the ampersand


> How do I write it so it says
> 
> &no_State unless $FORM{'US_State'} ###AND/OR### $FORM{'Other_State'} ;


   no_State() unless param('US_State') or param('Other_State');


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 23 Aug 2003 22:51:52 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Commonly used modules
Message-Id: <slrnbkfs08.c0.abigail@alexandra.abigail.nl>

Jon (jonov@iprimus.com.au) wrote on MMMDCXLIV September MCMXCIII in
<URL:news:3f46d58a_1@news.iprimus.com.au>:
-:  Hi,
-:  
-:  I'm curious to know what CPAN modules people use in their general day-to-day
-:  perl scripting (or can't live without). For example I make lots of use of 
-:  the Date::Manip module and would hate to have to ever implement something 
-:  like that.


Hmmm, what is this? perlmonks.org?

Anyway, my most used modules are all part of the standard distribution.
I've been working in a new job for two months now, used Perl for all
the projects (but one, used C for that) I've been involved with, but
haven't downloaded a single module from CPAN yet.

Modules I use often include POSIX and Fcntl.



Abigail
-- 
#!/opt/perl/bin/perl   --   # Remove trailing newline!
BEGIN{$SIG{__WARN__}=sub{$_=pop;y-_- -;print/".*(.)"/;  
truncate$0,-1+-s$0;exec$0;}}//rekcaH_lreP_rehtona_tsuJ


------------------------------

Date: Sat, 23 Aug 2003 19:13:57 +0100
From: Simon <simonyeats@hotmail.com>
Subject: csv translators
Message-Id: <oprudd9jfsuviw3g@news.adsl.iomart.com>


Whats the best way to use Perl to translate ; delimited fields in one file 
to differing positions in a second file?

Thanks, S


------------------------------

Date: Sat, 23 Aug 2003 14:28:16 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: csv translators
Message-Id: <slrnbkfg2g.3r8.tadmc@magna.augustmail.com>

Simon <simonyeats@hotmail.com> wrote:
> 
> Whats the best way to use Perl to translate ; delimited fields in one file 
> to differing positions in a second file?


Huh?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 23 Aug 2003 23:12:33 +0200
From: =?ISO-8859-15?Q?Steffen_M=FCller?= <sv99oya02@sneakemail.com>
Subject: Re: csv translators
Message-Id: <bi8lbk$l88$1@news.rz.uni-karlsruhe.de>

Simon wrote:
> 
> Whats the best way to use Perl to translate ; delimited fields in one 
> file to differing positions in a second file?

Use Text::CSV once. Use Text::CSV twice. Tell us what you're actually 
trying to do. Maybe we can help then.

Steffen
-- 
@n=([283488072,6076],[2105905181,8583184],[1823729722,9282996],[281232,
1312416],[1823790605,791604],[2104676663,884944]);$b=6;@c=' -/\_|'=~/./g
;for(@n){for$n(@$_){map{$h=int$n/$b**$_;$n-=$b**$_*$h;$c[@c]=$h}reverse
0..11;push@p,map{$c[$_]}@c[reverse$b..$#c];$#c=$b-1}$p[@p]="\n"}print@p;



------------------------------

Date: Sat, 23 Aug 2003 22:03:59 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: csv translators
Message-Id: <3F47E481.7030300@rochester.rr.com>

Simon wrote:

> 
> Whats the best way to use Perl to translate ; delimited fields in one 
> file to differing positions in a second file?
> 
> Thanks, S

It's a little hard too tell exactly what you want, but maybe it's 
something like:

while(<>){
    chomp;
    print join(';',(split ';',$_)[3,2,0,1]),"\n";
}

if you want the new field order to be old fields 3 then 2 then 0 then 1. 
  This also assumes your fields don't contain quoted delimiters.

It isn't clear what this has to do with the CSV translators mentioned in 
your subject.
-- 
Bob Walton



------------------------------

Date: Sat, 23 Aug 2003 19:21:37 GMT
From: "Jim Key" <jimkey@tds.net>
Subject: embeding tags
Message-Id: <59P1b.1568$cQ1.317802@kent.svc.tds.net>

I switched hosting companies recently.
I have a Perl script that will combine the results ($url) from the form
fields on one page and opens a new page, write the results in as a SSI tag.
I had no problem with this till I moved the site. Now, script opens a blank
page. Looking in the source code, there is the SSI tag that was generated
but I can't get the page to execute the tag. Embedding the tag in a html
page manually will work fine.
The code used:

print "Content-type: text/html\n\n";
print '<!--#include virtual="search.pl?',$url,'" -->';

Any suggestions are greatly appreciated.
Jim






------------------------------

Date: 23 Aug 2003 22:55:51 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: embeding tags
Message-Id: <slrnbkfs7n.c0.abigail@alexandra.abigail.nl>

Jim Key (jimkey@tds.net) wrote on MMMDCXLIV September MCMXCIII in
<URL:news:59P1b.1568$cQ1.317802@kent.svc.tds.net>:
\\  I switched hosting companies recently.
\\  I have a Perl script that will combine the results ($url) from the form
\\  fields on one page and opens a new page, write the results in as a SSI tag.
\\  I had no problem with this till I moved the site. Now, script opens a blank
\\  page. Looking in the source code, there is the SSI tag that was generated
\\  but I can't get the page to execute the tag. Embedding the tag in a html
\\  page manually will work fine.
\\  The code used:
\\  
\\  print "Content-type: text/html\n\n";
\\  print '<!--#include virtual="search.pl?',$url,'" -->';
\\  
\\  Any suggestions are greatly appreciated.


Do you actually have a Perl question, but you forgot to ask it,
or did you post this to the wrong group?



Abigail
-- 
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
 |perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
 |perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
 |perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;


------------------------------

Date: Sat, 23 Aug 2003 23:32:26 GMT
From: "Jim Key" <jimkey@tds.net>
Subject: Re: embeding tags
Message-Id: <eQS1b.1609$cQ1.328974@kent.svc.tds.net>

What could be the problem with this code that may not work on some servers?
Any other code I can use to get the same effects?




------------------------------

Date: 24 Aug 2003 00:05:11 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: embeding tags
Message-Id: <slrnbkg09n.c0.abigail@alexandra.abigail.nl>

Jim Key (jimkey@tds.net) wrote on MMMDCXLIV September MCMXCIII in
<URL:news:eQS1b.1609$cQ1.328974@kent.svc.tds.net>:
??  What could be the problem with this code that may not work on some servers?

Must be the bug on line 17.

??  Any other code I can use to get the same effects?


Apparently, I haven't been clear the first time. Let me rephrase it,
and if you still have problems understanding it, please indicate which
part you don't understand.

     This group is for discussing Perl issues. 
     This group is not for discussing applications that happen to
     be written in Perl. You'd go to your vendor for support.
     This group is not about discussing differences between types
     of cheese, nor is it about discussing particulars of "servers".


If you have a piece of code you are having problems with, by all means,
post a *SMALL* piece of code you have issues with, tell us what it does,
and what you expect it to do. Then we may help.

Otherwise, please go away.



Abigail
-- 
$" = "/"; split $, => eval join "+" => 1 .. 7;
*{"@_"} = sub  {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


------------------------------

Date: Sun, 24 Aug 2003 00:43:18 GMT
From: "Jim Key" <jimkey@tds.net>
Subject: Re: embeding tags
Message-Id: <GST1b.1620$cQ1.332419@kent.svc.tds.net>

As for posting a small piece of code, that's what I did (2 lines) in my
first post.
Is there a problem with the way code was written that may act differently on
different versions (?) of Perl on a server? Or was a better way of writing
the code that it will execute the same?
But don't bother. Diffenitley don't need any help from a JERK like you.





------------------------------

Date: 23 Aug 2003 22:58:25 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Perl build script woes doing Source Safe get
Message-Id: <slrnbkfsch.c0.abigail@alexandra.abigail.nl>

Marc S. Gibian (marc.gibian@acm.org) wrote on MMMDCXLIII September
MCMXCIII in <URL:news:8df11a0.0308221524.5f5fe3a5@posting.google.com>:
-:  
-:  My questions:
-:  
-:  1 - Why is source safe reporting a non-zero error code? What error is
-:  it reporting?
-:  
-:  2 - Is my script just being overly sensitive to warnings and such, or
-:  is there something here I can fix so that the "get" begins returning
-:  zero (again)?


Do you actually have a Perl question, and did you forget to ask it,
or did you post this in the wrong group?

We are not a group that supports random programs that just happen
to be written in Perl. 


Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$==-2449231+gm_julian_day+time);do{until($=<$#r){$_.=$r[$#r];$=-=$#r}for(;
!$r[--$#r];){}}while$=;$,="\x20";print+$_=>September=>MCMXCIII=>=>=>=>=>=>=>=>'


------------------------------

Date: Sat, 23 Aug 2003 18:07:42 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: Regular Expression Question
Message-Id: <3F47AE07.7396C110@earthlink.net>


Tad McClellan wrote:

>
> Matching an ampersand character.
>
> The whole character class will match a single character, as long
> as it is one of those 27 characters.

Yeah, that's what I meant to say.  Sorry about my poor
writing there.

So it's not doing anything magical - it's just another character
to match.




------------------------------

Date: Sat, 23 Aug 2003 20:05:15 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Saving Perl output
Message-Id: <Pine.LNX.4.53.0308231935300.5173@lxplus087.cern.ch>

On Sat, Aug 23, Peter Cooper seen on comp.lang.perl.misc:

[how a server can ask a browser to download rather than display:]

> It is. There are better ways of doing it than this, but put this script
> someplace where you can run CGI scripts:
>
> #!/usr/bin/perl          (or #!perl if you're on Windows)
> print "Content-type: application/octet-stream\n\n";
> foreach (1..1000) { print; }

Another living proof that off-topic questions bring incomplete and
potentially misleading answers.  But to address the various points
which immediately occur to me, would take the thread much further
off-topic for this group (clpm).

One good starting point would be
http://www.htmlhelp.com/faq/html/media.html#force-download

(f'ups redirected - beware the c.i.w.a.c automoderation 'bot)

B.t.w, Win32 Apache honours the "shebang-path".

best regards


-- 
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html


------------------------------

Date: 23 Aug 2003 13:26:17 -0700
From: altalingua@hotmail.com (David Morel)
Subject: Small memory problem
Message-Id: <60c4a7b1.0308231226.79c554eb@posting.google.com>

Hi all,

I am having a small problem with memory management.
Here is my code:

my $num = 500000;
my @paths;
# memory usage is now low
sleep 5;

for (my $i = 0; $i <= $num; $i++) {
  my $path = [$i, $i];
  push @paths, $path;
}
# memory usage is now high
sleep 5;

undef @paths;
# now I want to return to low memory usage,
# but the above undef statement doesn't get the job done! 
sleep 5;

Notice that in the second block of code I create an array with 500000
pointers. Then, in the third block of code, I delete all of the
pointers with undef (I think). Then why doesn't the garbage collector
kick in? I mean the total memory usage after the second block is about
75MB, and then it only drops to about 73MB... (as opposed to about
1MB) ?

Thanks!


------------------------------

Date: 23 Aug 2003 20:51:15 GMT
From: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
Subject: Re: Small memory problem
Message-Id: <slrnbkflaa.830.rgarciasuarez@dat.local>

David Morel wrote in comp.lang.perl.misc :
> Then why doesn't the garbage collector
> kick in? I mean the total memory usage after the second block is about
> 75MB, and then it only drops to about 73MB... (as opposed to about
> 1MB) ?

The "garbage collector" actually frees the data, but that
doesn't mean that the free memory will necessarily be returned
to the OS, available for other processes again.

-- 
Understand is not *NIX


------------------------------

Date: 23 Aug 2003 22:54:14 GMT
From: Nicholas Dronen <ndronen@io.frii.com>
Subject: Re: Small memory problem
Message-Id: <3f47f096$0$192$75868355@news.frii.net>

David Morel <altalingua@hotmail.com> wrote:
DM> Hi all,

DM> I am having a small problem with memory management.
DM> Here is my code:

DM> my $num = 500000;
DM> my @paths;
DM> # memory usage is now low
DM> sleep 5;

DM> for (my $i = 0; $i <= $num; $i++) {
DM>   my $path = [$i, $i];
DM>   push @paths, $path;
DM> }
DM> # memory usage is now high
DM> sleep 5;

DM> undef @paths;
DM> # now I want to return to low memory usage,
DM> # but the above undef statement doesn't get the job done! 
DM> sleep 5;

DM> Notice that in the second block of code I create an array with 500000
DM> pointers. Then, in the third block of code, I delete all of the
DM> pointers with undef (I think). Then why doesn't the garbage collector
DM> kick in? I mean the total memory usage after the second block is about
DM> 75MB, and then it only drops to about 73MB... (as opposed to about
DM> 1MB) ?

Did you check 'perldoc -q free'?

Found in /usr/share/perl/5.8.0/pod/perlfaq3.pod
       How can I free an array or hash so my program shrinks?

       You usually can't. On most operating systems, memory allocated to a
       program can never be returned to the system.  That's why long-running
       programs sometimes re-exec themselves. Some operating systems (notably,
       systems that use mmap(2) for allocating large chunks of memory) can
       reclaim memory that is no longer used, but on such systems, perl must
       be configured and compiled to use the OS's malloc, not perl's.

       . . . .

The pages of memory perl allocated *are* freed within the context
of the process.  What you're seeing, however, is that the memory
allocater hasn't shrunk the heap -- this is normal behavior.  Pages
allocated from the heap are "returned" to the operating system's
free pool of memory when the process exits.

Regards,

Nicholas

-- 
"Why shouldn't I top-post?"    http://www.aglami.com/tpfaq.html
"Meanings are another story."  http://www.ifas.org/wa/glossolalia.html


------------------------------

Date: Sat, 23 Aug 2003 23:17:49 GMT
From: makbo <makbo@pacbell.net>
Subject: Re: Strange problem with perl-oracle
Message-Id: <3F47F61D.8030604@pacbell.net>


It is your Oracle installation.   One is installed with optional 
security features and the other is not. This is why it works on one 
server and not the other.

The error message is confusing because a natural assumption is that you 
are supposed to look at some Solaris or Java readme.  However the 
README.java file that comes with DBD::Oracle distribution describes this 
problem.

But Wait!!! You don't have to perform any "major surgery" or the 
complicated error prone hacks given in the README.java file.  (Not to 
mention that some of these will almost certainly prevent you from 
getting support from Oracle Corp. under your license.)

Just re-run the Oracle Installer program and when you get to the part 
about "Do you want to install optional security support?" (such as 
RADIUS) just say no.  This does not affect Oracle's basic built-in security.

Alternately, if you are careful to skip log files and various 
configuration files, you can even rsync the $ORACLE_HOME directory tree 
from one machine to the other (but this too may void your Oracle support).

--Mark Bole

alessandro.lagostena wrote:

Hello Gents

I have strange problem with a perl script that query a Oracle DB


[...]

You must install a Solaris patch to run this version of the Java runtime.
Please see the README and release notes for more information.
  I think that the errors appears when the program try to connect at the DB

I have compared the 2 box but seams equals , objvius a difference are 
present but i not know where find it

Can someone have some sudgestion about this probelm ?

Thanks for the support

Regards LAG



------------------------------

Date: Sat, 23 Aug 2003 14:26:02 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Using Sprintf (was Re: Matching FP Numbers and Using Sprintf)
Message-Id: <slrnbkffua.3r8.tadmc@magna.augustmail.com>

Mike Flannigan <mikeflan@earthlink.net> wrote:
> Tad McClellan wrote:
>> Mike Flannigan <mikeflan@earthlink.net> wrote:


>> > Maybe it's just me, but I don't find the documentation on
>> > sprintf to be very enlightening.  I've read it many times
>> > and still can't figure it out, despite being a math kinda
>>                          ^^

>> What "it"?
> 
> As you have probably already figured out, "it" was the
> format syntax.


The only thing wrong with the _syntax_ was the missing quotes.


> For instance, I'm surprised to find that "%12.9f" seems
> to give the same output at "%.9f".


That is a *different* "it", the second one I described.

You seem to have confused "syntax" with "semantics".

"syntax" has to do with whether it is formed correctly or not.

"semantics" has to do with what it _means_.


> I would expect that "%12.9f" would only give 8 numbers
> after the decimal for a number over 100


That is a problem with the semantics of (s)printf, not with its syntax.


The first number is the "minimum width", if it is less that 12
chars (counting the decimal point) then it will be padded to 12
chars. If it is more that 12 chars then it will be formatted as
more than 12 chars.

The second number is the number of places after the decimal point,
if there are less than that many, that will be padded out too.

So, %12.9 is normally:

   2 chars whole number part
   1 decimal point char
   9 chars after the decimal point

With the whole number part padded with spaces on the left, and the
decimal part padded with zeros on the right, if required.

Unless the number is >= 100, in which case there will be more than
2 chars in the whole number part, and the entire thing will be
more than the 12 char minimum.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: 
Message-Id: <3F18A600.3040306@rochester.rr.com>

Ron wrote:

> Tried this code get a server 500 error.
> 
> Anyone know what's wrong with it?
> 
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {

(---^


>     dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
 ...
> Ron

 ...
-- 
Bob Walton



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 5416
***************************************


home help back first fref pref prev next nref lref last post