[11113] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4713 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 21 17:06:09 1999

Date: Thu, 21 Jan 99 14:00:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 21 Jan 1999     Volume: 8 Number: 4713

Today's topics:
        [Perlscript + WSH]: Can't get it to work (Harshal Chhaya)
    Re: ancestry of perl features droby@copyright.com
    Re: ancestry of perl features <uri@ibnets.com>
        finding dirs with readdir <bgilbert@sgi.com>
    Re: glob "toggle" behaviour (urgent!) scott.craig@moh.hnet.bc.ca
        How do I define a scalar name with a scalar <cpuweb@cpuweb.com>
    Re: How long would the Unixes last without Perl? (I R A Aggie)
        Is there an HTML to CGI.pm converter?? (Jete Software Inc.)
    Re: list of hashes (Abigail)
    Re: Looking for free Web Server with CGI <san@acsoft.dk>
        NT and Perl problem <stuart.greenfield@cpa.state.tx.us>
    Re: Oracle from Linux (Christian M. Aranda)
        Pattern match behaves strangely (Richard Rowell)
    Re: Perl uses in NT <tripp.lilley@perspex.com>
    Re: PLease Help CGI configuration problem (I R A Aggie)
    Re: Please help me to use sockets (Bart Lateur)
    Re: Problems with Socket.pm on AIX (Clinton Pierce)
    Re: Ubiquitous Script <j.marshall@dial.pipex.com>
        undefined value warning when it is defined <brad@langhorst.com>
        What am I doing wrong with this checksum? rrafydoj@hotmail.com
        Win32::NetResource::NetShareAdd() on win9x <urs.rau@uk.om.org>
        writing to files (J Holden)
    Re: writing to files <mwatkins@promotion4free.com>
    Re: Year 2038 problem <mike@chessell.demon.co.uk>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 21 Jan 99 19:52:53 GMT
From: hchhaya@JunkTHIS.ti.com (Harshal Chhaya)
Subject: [Perlscript + WSH]: Can't get it to work
Message-Id: <7880fo$2i9$1@superb.csc.ti.com>


Hi

I am trying to use the example scriptlets from the "Scriptlets" article in the 
Perl Journal (issue #12).

On my Win95 box, I have the WSH engine, the DCOM95 stuff, AS Perl (build 507) 
and VB 6.0.

The sample VBScript and JScript scriplets run fine (showing that the WSH stuff 
works fine) but when I try to run the PerlScript file (via the Visual Basic 
interface), I get an error saying "Cannot create script engine: PerlScript". 
The debugger points to the "CreateObject" statement in the VB app.

Moving the perlse.dll file to \windows\system dir results in "Out of memory" 
errors.

I am quite sure I am missing something obvious. Is there anything else I need 
to install to use PerlScript scriptlets with WSH?

Thanks much,
- 'shal


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

Date: Thu, 21 Jan 1999 21:00:33 GMT
From: droby@copyright.com
Subject: Re: ancestry of perl features
Message-Id: <7884ha$82n$1@nnrp1.dejanews.com>

In article <36A7223B.DE14E736@synersoft.fr>,
  Roman Stawski <roman.stawski@synersoft.fr> wrote:
>
> Sean McAfee wrote:
> >
> > In article <393e5531xn.fsf@ibnets.com>, Uri Guttman  <uri@ibnets.com> wrote:
> >
> > [snip]
> >
> > ampersand function call syntax -- BASIC (specific variety unknown to me
> >   personally, although the perl man page refers to a "BASIC-PLUS")
> >
> Try Digital's Basic+ and Basic+2 that used to run on PDP (RSTS and RSX)
> and early VAXes.
>

RSTS/E was written in Basic+  ;-)

I think Basic+2 came out about the same time as Vax/VMS, and was
approximately a porting of Vax Basic to the PDP-11.  They ported DCL to
RSTS/E at about the same time.

> I believe that this is where the statement qualifier
> 	[expr] if|unless [condition]
> syntax came from too
>

I'm not sure (it's been a long time...) but I think these were introduced in
Vax Basic and Basic+2.	I'm pretty sure they weren't there in Basic+.  I'm
not sure it even had while and until in their other usage.

Whether this was their first appearance may be another thing.


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 21 Jan 1999 15:53:38 -0500
From: Uri Guttman <uri@ibnets.com>
To: lr@hpl.hp.com (Larry Rosler)
Subject: Re: ancestry of perl features
Message-Id: <39zp7c1h65.fsf@ibnets.com>

>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:

  LR> In article <393e5531xn.fsf@ibnets.com> on 20 Jan 1999 19:27:32 -0500, 
  LR> Uri Guttman <uri@ibnets.com> says...
  >> 
  >> tr///					tr, sed y (does anyone use y?)

  LR> I do -- it's one character fewer, and I learned awk first :-)

you are one lazy bastard! :-)

i like tr because it maps to tr (the unix program) and to translate (the
pl/1 function). what does y map to? i used sed but not enough to think
of y as translate.

  LR> statement terminator ; from C, from B, ...

pl/1, algol had it. b is from early 70's IIR and is later.

  LR> What happened to function definitions and invocations, and to classes 
  LR> and various OOP stuff?

and i was thinking about those and i didn't come up with any direct
ancestors. i don't know enough OO languages to see where larry borrowed
from. the syntax and semantics of functions and OO in perl don't seem
similar to any others that i know about.

also i didn't have the time or energy to type in the camel. i used a
desktop reference and just entered as many as i felt like. i assumed you
and others would fill in the blanks.

  LR> This should turn out to be an instructive thread!

that was my intent.

uri

-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ironbridgenetworks.com	


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

Date: Thu, 21 Jan 1999 12:35:39 -0800
From: Ben Gilbert <bgilbert@sgi.com>
Subject: finding dirs with readdir
Message-Id: <36A78F9B.2C082017@sgi.com>

Hi,

I want to place all the .jpg and .gif files into one array (@img) and
all the directories in another (@dir) when given a directory path (not
recursively). This code seems to work fine for the images but not when
listing the directories. It seems to only grab a couple of directories
(sometimes . and .. but sometimes more) and leave the rest. There is
seemingly no difference between the directories (permissions,
modification dates, directory contents, etc). 

my $path = ".";

opendir(DIR, $path) or die "couldn't open $path ($!)\n";

my @img = grep { /\.jpg$/i || /\.gif$/i } readdir(DIR);
rewinddir(DIR);
my @dir = grep { -d } readdir(DIR);

closedir (DIR);

Any ideas?

-Ben

-- 
Ben Gilbert   bgilbert@sgi.com   http://reality.sgi.com/bgilbert/
-----------------------------------------------------------------
This transmogrifier will turn you into anything at all. - Calvin
-----------------------------------------------------------------


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

Date: Thu, 21 Jan 1999 21:08:24 GMT
From: scott.craig@moh.hnet.bc.ca
Subject: Re: glob "toggle" behaviour (urgent!)
Message-Id: <7884vv$8bo$1@nnrp1.dejanews.com>

Programming Perl, p.56

In a scalar context, the operator returns the next value each time it is
called, or a false value if you've just run out. ... So if you're expecting a
single value from a glob, it is much better to say:

($file) = glob("~myname/myfile");  ## (changed to reflect this question)

In article <36A6DD6D.41C6@trieste.infn.it>,
  Claudio Strizzolo <Claudio.Strizzolo@trieste.infn.it> wrote:
> Hi all,
> 	I have a strange problem with a small script using glob
> on a Unix machine.
> When running glob to expand a filepath for a number of times, it
> seems to work the first time, but it returns null on the second
> one; then it works again the third one, but not the fourth, and
> so on.
> Here is the script:
>
> #!/usr/local/bin/perl
>
> for ($i=0; $i<5; $i++) {
>   printf("=========== %d ===========\n",$i);
>   $file=glob("~myname/myfile");
>   printf("%s",qx{ls -la $file});
> }
>
> (BTW, maybe the "printf" line is not such a good programming
> example, but I put it there just for a test. The same behaviour
> applies for anything I try to do with $file. The problem is in
> "glob")
>
> Here is what I get when I run it:
>
> # pluto.pl
> =========== 0 ===========
> -rw-rw-r--   1 strizzol users  81 Jan 20 15:05 /usr/users/myname/myfile
> =========== 1 ===========
> total 42
> =========== 2 ===========
> -rw-rw-r--   1 strizzol users  81 Jan 20 15:05 /usr/users/myname/myfile
> =========== 3 ===========
> total 42
> =========== 4 ===========
> -rw-rw-r--   1 strizzol users  81 Jan 20 15:05 /usr/users/myname/myfile
>
> Is there any workaround?
> BTW, I need a solution for a larger urgent project. If possible, please
> send me any reply through e-mail too.
> Thank you very very much in advance
>
> 	Claudio
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 21 Jan 1999 15:21:48 -0600
From: "Matt Johnson" <cpuweb@cpuweb.com>
Subject: How do I define a scalar name with a scalar
Message-Id: <7885tb$2ur$1@news.ipa.net>

In my program I am wanting to use a scalar as part of the name for another
scalar.
Here is an example of what I am trying to acomplish, and what I would like
for the output.


$scalar1 = 1;
$scalar2 = _long;

$special1 = "Have a nice day";
$special_long = "This is a long long line of nonsense";

print $special$scalar1;


What I want it to print "Have a nice day" but what it prints is "1" because
there is no value for "$special" and the value for "$scalar1" is "1". I am
pretty sure I have seen something like this acomplished before, but I can't
find the right way of specifiying how to make it print that.

If you know how to do this I would appreciate if you email me
cpuweb@cpuweb.com




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

Date: Thu, 21 Jan 1999 15:30:50 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: How long would the Unixes last without Perl?
Message-Id: <fl_aggie-2101991530510001@aggie.coaps.fsu.edu>

In article <787uac$do3$1@news0-alterdial.uu.net>, gward@cnri.reston.va.us
(Greg Ward) wrote:

+ Last time I checked, it still takes a couple of clues to build and 
+ install Perl.

It depends on the system. Our IRIXes, for instance, have a bear of a time
compiling perl out-of-the-box. On the otherhand, it compiled without a glitch
or gripe on my Linux box at home.

James


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

Date: 21 Jan 1999 16:18:39 -0500
From: jete@dgs.dgsys.com (Jete Software Inc.)
Subject: Is there an HTML to CGI.pm converter??
Message-Id: <7885jf$1sl@dgs.dgsys.com>

We have reams and reams of HTML code which needs to be converted so
that it is expressed in terms of CGI.pm code. Is there a converter
which will accept a file of HTML code and produce the appropriate
calls to CGI.pm routines to produce output which is identical to its 
HMTL input??

Thanks!!



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

Date: 21 Jan 1999 19:50:26 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: list of hashes
Message-Id: <7880e2$1mo$2@client2.news.psi.net>

dhosek@webley.com (dhosek@webley.com) wrote on MCMLXIX September MCMXCIII
in <URL:news:787tha$1fr$1@nnrp1.dejanews.com>:
:: In article <78548m$ejs$5@client2.news.psi.net>,
::   abigail@fnx.com wrote:
:: > Alex Farber (alex@kawo2.rwth-aachen.de) wrote on MCMLXVIII September
:: > MCMXCIII in <URL:news:36A61CBA.E95076A7@kawo2.rwth-aachen.de>:
:: 
:: > [] could you please explain it little bit more? Because you seem
:: > [] to be correct - it looked like I was always pushing the same
:: > [] (it printed HASH(0x80c5c9c) for all occurences) empty hash with
:: > [] my SybPerl-script:
:: 
:: > RTFM. It's documented.
:: 
:: And the documentation is not at clear on how to handle this sort of thing.
:: Have YOU read the documentation, Abigail?

What's so unclear about:

    If $wantRef is non-0, then a reference to an array
    (or hash) is returned. This reference points to a
    static array (or hash), so to store the returned
    rows in an array you must copy the array (or hash):

      while($d = $dbh->ct_fetch(1, 1)) {
        push(@rows, {%$d});
      }


It explains *exactly* the problem, it tells you how to solve it, and
it includes even an example how to do it.

What else do you need? Someone to actually do the cut-and-paste for you?



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=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: Thu, 21 Jan 1999 21:59:00 +0100
From: Steen Angelo <san@acsoft.dk>
Subject: Re: Looking for free Web Server with CGI
Message-Id: <36A79514.C9794DB4@acsoft.dk>

Hi there.

In my search for the same, someone (in a newsgroup) suggested PI3 Webserver
located at http://www.johnroy.com/

Have a go, and try for yourself ;-)

Best regards

Steen Angelo


(if you eat a meal of pasta, and then afterwards have a meal antipasta, are
you then  hungry again?)

Stefan Mueller wrote:

> Chris wrote:
> >
> > Hi
> >
> > Are there any free Web servers for Win98 (even trial versions) that
> > allow me to mess around with CGI & Perl? Last time I tried this (years
> > ago), PWS was supposed to do it but it was broken (or I was broken, or
> > something)
>
> Try apache. There're binaries available on www.apache.org
> And get perl from www.activestate.com.
>
> It works fine for me.
>
> Stefan.
>
>
> --------------------------------------------
> Dipl.-Ing. Stefan Mueller
> Ruhr-University Bochum
> AG f. num. Meth. i.d. Mechanik und
>   Simulationstechnik
> Germany
> --------------------------------------------



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

Date: 21 Jan 1999 20:56:22 GMT
From: Stuart Greenfield <stuart.greenfield@cpa.state.tx.us>
Subject: NT and Perl problem
Message-Id: <78849m$hdj$1@news.tdh.state.tx.us>

We are using Perl(V5.004 for NT 4.0) CGI 
scripts with MS' IIS server (In this case V2.0)?  We keep 
getting an intermittent failure something like:

CGI ERROR - malformed http headers

which, I know, is pretty much a catch all message.
Anyway, we are experiencing hell finding the cause.  It happens 
infrequently but when it does we have to reboot the server 
to clear it up.
Any ideas, suggestions, prayers, live sacrifices, etc. are 
more than welcome.

  __   |                |    stuart.greenfield@cpa.state.tx.us
 /__ __|__      _   _ __|__  Stuart Greenfield, Analyst
    /  |  |  |  _\ |    |    Comptroller of Public Accounts
 __/   |  |__| (_| |    |    111 E. 17th St., Rm 201
                             Austin, TX  78701
                             (512) 475-4361  475-0774 (FAX)


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

Date: Thu, 21 Jan 1999 20:30:40 GMT
From: christian.arandaNOSPAM@NOSPAMiiginc.com (Christian M. Aranda)
Subject: Re: Oracle from Linux
Message-Id: <788291$fg9$1@news-2.news.gte.net>

On Thu, 21 Jan 1999 16:49:17 +0000, Rolf Howarth <rolf@parallax.co.uk>
wrote:

>Why is there no . . . 

perl questions in site?


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

Date: Thu, 21 Jan 1999 20:27:15 GMT
From: no.richro.spam@acm.org (Richard Rowell)
Subject: Pattern match behaves strangely
Message-Id: <36a77505.175090106@news.shreve.net>

$cline="            DeleteFile(RFileFunctions.GetTempPath +
'\LIST.TXT');";

if (($cline =~/\s*constructor/i) ||
    ($cline =~/\s*destructor/i) ||
    ($cline =~/\s*procedure/i) || 
    ($cline =~/\s*function/i))
    {
      print "YUP\n";
    }else{
      print "NOPE\b";
    }


This prints YUP for some reason.  I thought that \s* would only match
spaces, \t,\n,\r, and \f (whatever \r, and \f are).  However if I
replace the \s* with just a \s or a " " then it works, why?


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

Date: Thu, 21 Jan 1999 15:40:22 -0500
From: Tripp Lilley <tripp.lilley@perspex.com>
Subject: Re: Perl uses in NT
Message-Id: <36A790B6.C1C5CCB8@perspex.com>

> > Mike wrote in message <773m45$dt0$1@nnrp03.primenet.com>...
> > >Hi, I'm new to the Perl world. My boss, a unix administrator, suggested I
> > >learn some Perl and apply it to my NT administration. Could anyone show me
> > >where I could find some good examples or situations where I could use Perl
> > >in NT?

Also check out these O'Reilly books:

* Windows NT User Administration
http://www.amazon.com/exec/obidos/ASIN/1565923014/perspeximagework/

* Essential Windows NT System Administration
http://www.amazon.com/exec/obidos/ASIN/1565922743/perspeximagework/

* Learning Perl on Win32 Systems
http://www.amazon.com/exec/obidos/ASIN/1565923243/perspeximagework/


All three deal with Perl under NT in one way or another. The two
'administration' books cover using Perl to automate a bunch of basic
tasks, and provide pointers to extant scripts. The "Learning" book, in
addition to being a great introduction to Perl itself, gives a good bit
of Win32 specific intro to things like OLE Automation and the like,
which will prove useful as you try to wrestle your NT machines into
submission.


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

Date: Thu, 21 Jan 1999 15:22:20 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: PLease Help CGI configuration problem
Message-Id: <fl_aggie-2101991522200001@aggie.coaps.fsu.edu>

In article <787qbi$pm7$1@camel15.mindspring.com>,
<bsh@mindspring.com@mindspring.com@mindspring.com> wrote:

+ Thanks for coming this far.
+ 
+ I am a newbe when it comes to html, I installed perl5.004 on my spark 5 with
+ the CGI modules. I am now getting a screen waiting with the message:
+ 
+ (waitinig for HTTP query from standard output)

Ummm...what are you doing to get this?

James


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

Date: Thu, 21 Jan 1999 19:48:32 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Please help me to use sockets
Message-Id: <36a9846e.1083395@news.skynet.be>

Ales Turai wrote:

>I would like to detect throught perl cgi script if a page on other server
>exist. So I need to detect e.g. if the pages of these urls exists...
>http://www.any.any/directory/page.any
>http://www.nameofdomain.com/anydirectory/

No, not sockets, but LWP. Go to CPAN (www.cpan.org or www.perl.com/cpan/
) and get the libwww module(s). Try LWP::Simple. This should work,
according to the included docs (command: "perldoc LWP::Simple")

     use LWP::Simple;
     ($content_type, $document_length, $modified_time, $expires,
	$server) = get('http://www.any.any/directory/page.any');
or
     $success = get('http://www.any.any/directory/page.any');

	Bart.


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

Date: Thu, 21 Jan 1999 19:32:32 GMT
From: cpierce1@mail.ford.com (Clinton Pierce)
Subject: Re: Problems with Socket.pm on AIX
Message-Id: <36a97f89.100508045@news.ford.com>

[Courtesy CC sent to poster in E-Mail]

On Thu, 21 Jan 1999 18:51:33 GMT, kriggins@ibm.net wrote:
>Compiled perl 5.005_02 on an RS6000 host running AIX 4.2.1.
>Exported the /usr/local directory structure to my other hosts.
>Wrote a perl program to listen on a socket and return some text on connect.
>
>Works great from the system I compiled perl on.  Fails with the following
>error message when it tries to perform the following statement.
>
>Statement:
>bind(Server, sockaddr_in($port, INADDR_ANY)) or die "bind: $!";
>
>Error:
>Use of uninitialized value at /usr/local/lib/perl5/5.00502/aix/Socket.pm line
>278.

Hmmm...somewhere else in the code, did you create the socket "Server"?
Are you sure?  :-)  Make sure that the socket() call didn't fail.  Is
$port defined?  Are you sure?   Is INADDR_ANY defined?  Are you sure?

Just before this bind(), make sure the values are all defined properly,
maybe with something like this:

	if (!defined $port) {
		die "SHOULD NOT HAPPEN port is undefined";
	}


Or, if that doesn't find the culprit, take a look at line 278 of
/usr/local/.../Socket.pm.  (Yours may differ from ours slightly from
mine, otherwise I'd look.)  What's it expecting?  How can that value be
undefined?


-- 
 Clinton A. Pierce    "If you rush a Miracle Man, you get rotten
 cpierce1@ford.com        miracles" --Miracle Max, The Princess Bride
clintp@geeksalad.org   http://www.geeksalad.org


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

Date: Thu, 21 Jan 1999 20:52:10 +0000
From: Main account <j.marshall@dial.pipex.com>
Subject: Re: Ubiquitous Script
Message-Id: <36A79379.FBC44BD2@dial.pipex.com>

Emmanuel M. Dicarie wrote:

> Hello,
>
> I'm trying to figure out a way to do the following and looking for
> pointers on this question. I'm using the korn shell on a ISP account.
>
> Imagine that I have a "processFiles" script that process every files in a
> directory and print the result. The script is in /home/emmanuel/libPerl/.
> The script take for param the name of a directory. So I can do something
> like this: processFiles /home/emmanuel/oneDirectory/
>
> Now I want to be able to call this script from any directory without
> having to prefix it with its current directory (~/libPerl/processFiles  or
> /home/emmanuel/libPerl/processFiles), and be able to pass to this script
> the current directory I'm in without having to write the current whole
> path.
>
> My questions are :
>
> 1) Is there a way to call a scrip from anywhere without specifying where
> the script reside?
>
> I guess (I didn't try this yet) I can call this script with a shell alias
> or a shell function and write this alias/function in my .profile file.
>
> But maybe there is a more perlish way (maybe something like including the
> path to the script in my PERL5LIB that is exported to my %ENV every time I
> log in my account).
>
> 2) Also, instead of giving as parameter to my script a whole path to the
> directory where I want to process the files, is it possible to do
> something like
> processFiles pwd ?
>
> TIA
>
> -Emmanuel
>
> --
> Emmanuel
> EMAIL => emm*cam.org
> To email me, please replace "*" by "@"

  if  you want to call the script from anywhere simply by it's name just put
the directory where it lives in your path - ie. in your .kshrc ( or whatever
you have called your korn shell environment file ) :-
PATH=${PATH}:/"directory of script"
export PATH.

as for calling the script without typing in full directory if you are in that
directory -  Processfiles . ( . just being your current working dir ).



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

Date: Thu, 21 Jan 1999 12:56:02 -0500
From: "Bradley W. Langhorst" <brad@langhorst.com>
Subject: undefined value warning when it is defined
Message-Id: <36A76A32.44583054@langhorst.com>


the following code give me an undefined value warning
anybody know why?

for ($row=0;$row<=@OrderedKeys;$row++) {
    #print $row . "\n";
    for($i=$row; $i<=@OrderedKeys; $i++) {
     #print $i . "\n";
     #print $results->{$OrderedKeys[$row]}->{'START'} . "\t";
     #print $results->{$OrderedKeys[$i]}->{'START'} . "\t";
     #print $results->{$OrderedKeys[$row]}->{'LN'} . "\n";

     if (abs($results->{$OrderedKeys[$row]}->{'START'} -
$results->{$OrderedKeys[$i]}->{'START'} ) <
($results->{$OrderedKeys[$row]}->{'LN'}-4)) {
         $numoverlaps++;
     }
     #print $results->{$OrderedKeys[$row]}->{'SEQUENCE'} . "\n";
     #print $results->{$OrderedKeys[$i]}->{'SEQUENCE'} . "\n";
     if ($numoverlaps > 1 ) { #don't bother to check more
         next;
     }
>>>>>$CompValue =
GetCompValue($results->{$OrderedKeys[$row]}->{'SEQUENCE'},
$results->{$OrderedKeys[$i]}->{'SEQUENCE'},$Overlap );
     #if ($CompValue > 0) {print $CompValue . "\n";}
     if ($CompValue > $MaxCompValue) {$MaxCompValue = $CompValue;}
        printf ("\rWorking... %3.2f% \tMax Comparison Value = %1.2f ",
($row/$numkeys) *100,$CompValue)
    }


    if ($numoverlaps <= 1) { #one overlap is allowed (overlap with self)

>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'#'} . "\t");
>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'SEQUENCE'} .
"\t");
>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'START'} .
"\t");
>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'LN'} . "\t");

>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'N'} . "\t");
>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'GC%'} .
"\t");
>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'TM'} . "\t");

>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'ANY'} .
"\t");
>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'END'} .
"\t");
>         print OUTFILE ($results->{$OrderedKeys[$row]}->{'LITY'} .
"\t");
>         print OUTFILE $MaxCompValue . "\n";
         $NumGood++;
    }
    $numoverlaps = 0;
    #next from the for loop comes here
}


i know everything is defined
because i explicitly defined it like
my $row = 0;

i get this for every print OUTFILE line
and at the line that says $CompValue = GetCompValue...
i know i can turn of  -w and things will "appear" fine but i want to
know why this is happening
maybe i've made an error  and im not getting the values i want...

thanks
pls cc e-mail
brad@langhorst.com



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

Date: Thu, 21 Jan 1999 20:31:10 GMT
From: rrafydoj@hotmail.com
Subject: What am I doing wrong with this checksum?
Message-Id: <7882qe$6er$1@nnrp1.dejanews.com>

I've been thrown a project in Perl, and I have to come up with a checksum
utility.  I read all the messages here on unpack, but I'm not getting what I
had hoped to get.  See if you can follow this pseudocode logic:

a = "My Name";
# Next line returns the ascii sum of the string
b = unpack("%16C*",a);

Now, at this point, I need to convert b, which is 615, to binary to arrive at
"0000001001100111".  Next, I need to convert each 4-bit chunk back into
decimal (don't ask), to arrive at the number "0267".

Is there a simple way to do that?  Please be gentle...this is my first Perl
project.

Thanks!
Jody Farr
rrafydoj@hotmail.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 21 Jan 1999 20:00:45 +0000
From: Urs Rau <urs.rau@uk.om.org>
Subject: Win32::NetResource::NetShareAdd() on win9x
Message-Id: <36A7876D.10E8DA17@uk.om.org>

Hi folks,

I would like to get info and create shares on win9x using AS 509.
It seems to me none of the functions in win32-netresource can be used
from under win9x? (although I can't see this from the docs)
On my machines the scripts run fine under NT4 but refuse to even compile
under win9x.
Is there any way to use the win32-netresouce pkg also from under win9x?

Are there any alternatives or workarounds?
The main thing for me is to get information about local shares and
possibly create some from within the perl script running under win9x.
Any help or suggestions?




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

Date: Thu, 21 Jan 1999 19:54:47 GMT
From: jholden@voyager.net (J Holden)
Subject: writing to files
Message-Id: <7880mp$87d@news.voyager.net>

Is there any simple way to insert into the top of a file instead of
jsut appending to the bottom?

thnx




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

Date: Thu, 21 Jan 1999 20:25:23 -0000
From: "Mike Watkins" <mwatkins@promotion4free.com>
Subject: Re: writing to files
Message-Id: <uAjUTwXR#GA.131@nih2naac.prod2.compuserve.com>

Hi there,

Try this...

open (FILE, 'file.txt');
@File = <FILE>; close (FILE);
chomp (@File);

unshift (@File, $NEW_TOP_LINE);

open (FILE, '>file.txt');
foreach $Row (@File) {
    print FILE "$Row\n"; }
close (FILE);

See ya,
Mike

J Holden wrote in message <7880mp$87d@news.voyager.net>...
>Is there any simple way to insert into the top of a file instead of
>jsut appending to the bottom?
>
>thnx
>
>




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

Date: Wed, 20 Jan 1999 23:17:32 +0000
From: Mike Newsome <mike@chessell.demon.co.uk>
Subject: Re: Year 2038 problem
Message-Id: <wSrTDKAMQmp2EwOr@chessell.demon.co.uk>

In article <784v4c$f61@post.gsfc.nasa.gov>, curt@module.? writes
>Matt Curtin (cmcurtin@interhack.net) wrote:
>: $ uname -a
>: IRIX gonzo 6.5 05190004 IP32
cut.....
>
>% uname -ms
>Linux alpha
>% perl -v
>
>This is perl, version 5.005_02 built for alpha-linux
>
>% perl -e 'print scalar localtime 2**30, "\n"'
>Sat Jan 10 08:37:04 2004
>% perl -e 'print scalar localtime 2**31, "\n"'
>Mon Jan 18 22:14:08 2038
>% perl -e 'print scalar localtime 2**55, "\n"'
>Sun Jun 13 01:26:08 1141709097
>
Out of interest I ran a similar set on my W95 box, with ActivePerl build
508 and got:

2**30:   Sat Jan 10 13:37:04 2004
2**31:
2**31-1: Tue Jan 19 03:14:07 2038
2**32:   Thu Jan  1 00:00:00 1970
2**33:   Thu Jan  1 00:00:00 1970
2**34:   Thu Jan  1 00:00:00 1970
2**35:   Thu Jan  1 00:00:00 1970
2**60:   Thu Jan  1 00:00:00 1970

Most interested in the missing line for 2**31.

Will try it on NT when I can.
-- 
Mike Newsome                 Worthing, England




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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 4713
**************************************

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