[16413] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3825 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 27 18:15:47 2000

Date: Thu, 27 Jul 2000 15:15:32 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <964736131-v9-i3825@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 27 Jul 2000     Volume: 9 Number: 3825

Today's topics:
    Re: Newbie needs HELP... NET::TELNET (matt venn)
    Re: newbie question, can a perl program run 24/7 <iltzu@sci.invalid>
    Re: newbie question, can a perl program run 24/7 (Decklin Foster)
    Re: newbie question, can a perl program run 24/7 (Greg Bacon)
    Re: nntp client <iltzu@sci.invalid>
    Re: plotting graph (Eric Smith)
    Re: plotting graph (Abigail)
        Problem with Apache & win32::pipe <daneel@tux.org>
    Re: Problem with oracle cursors <rmahoneyNOrmSPAM@infotech-nj.com.invalid>
    Re: regexp match inside a time interval ? <lr@hpl.hp.com>
    Re: return value of `eval "use lib"' <sumus@aut.dk>
    Re: return value of `eval "use lib"' <bart.lateur@skynet.be>
    Re: shifting strings <lauren_smith13@hotmail.com>
    Re: Suggestion for syntax change <lr@hpl.hp.com>
    Re: Suggestion for syntax change <keithmur@mindspring.com>
    Re: Suggestion for syntax change <iltzu@sci.invalid>
    Re: To sys op - get me off your email list <iltzu@sci.invalid>
        Uploading files from a Win9x computer <r52270@email.sps.mot.com>
    Re: Was Why won't  "use strict;"  work? (BUCK NAKED1)
        what is the best way to search multiple files? dakotamitchell@my-deja.com
    Re: Why doesn't my Perl script execute? <lr@hpl.hp.com>
    Re: Why doesn't my Perl script execute? <iltzu@sci.invalid>
        Win32 Perl on NT: Domain Sync-ing <steve@i66.net>
        Win32: Profiles for terminal server <steve@i66.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 27 Jul 2000 22:04:33 GMT
From: matt@NOSPAMraas.screaming.net (matt venn)
Subject: Re: Newbie needs HELP... NET::TELNET
Message-Id: <3980b1c9.43481332@news.ntlworld.com>

id be interested in replies to this as well.
i couldnt get it to work either. im sure it has something to do with
setting the prompt, but i couldnt find any documentation about it.

matt


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

Date: 27 Jul 2000 19:02:43 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: newbie question, can a perl program run 24/7
Message-Id: <964724392.18672@itz.pp.sci.fi>

In article <8lps3n$s1s$1@nnrp1.deja.com>, drdementor@my-deja.com wrote:
>process the information and generate a unike responce, then mail it
>back to the user. I also want to have a delay so that the user thinks a
>real tech support represenative helped them...

You mean sort of like Tom Phoenix?

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method."  -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.




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

Date: Thu, 27 Jul 2000 20:36:49 GMT
From: decklin+usenet@red-bean.com (Decklin Foster)
Subject: Re: newbie question, can a perl program run 24/7
Message-Id: <B31g5.7403$f_5.31774@news1.rdc1.ct.home.com>

drdementor@my-deja.com <drdementor@my-deja.com> writes:

> i need to read the incomming mail,,, by code alreay in existance or
> whatever, the easiest way.....
> 
> process the information and generate a unike responce, then mail it
> back to the user. I also want to have a delay so that the user thinks a
> real tech support represenative helped them...

What's wrong with procmail?

-- 
There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)


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

Date: Thu, 27 Jul 2000 20:42:22 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: newbie question, can a perl program run 24/7
Message-Id: <so17lerp3j17@corp.supernews.com>

In article <B31g5.7403$f_5.31774@news1.rdc1.ct.home.com>,
    Decklin Foster <decklin+usenet@red-bean.com> wrote:

: What's wrong with procmail?

Plenty. :-)

Greg
-- 
Today a racist is anyone who is winning an argument with a liberal.
    -- Peter Brimelow


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

Date: 27 Jul 2000 18:53:22 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: nntp client
Message-Id: <964723690.17617@itz.pp.sci.fi>

In article <slrn8o0s7t.vcg.abigail@alexandra.foad.org>, Abigail wrote:
>Chris Morris (chris.morris@supanet.net.uk) wrote on MMDXXII September
>MCMXCIII in <URL:news:39806192.A13ED925@supanet.net.uk>:
>|| Does anyone know of a script that will act as a newsreader?
>
>perl -e 'exec "slrn"'

That assumes the existence of an external program not everyone may
have.  I would prefer something simpler and more portable:

  perl -e 'exec "telnet news 119"'

You may need to adjust the hostname to match your Usenet provider's
configuration, though the default shown should work in most cases.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method."  -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: 27 Jul 2000 20:23:29 GMT
From: eric@fruitcom.com (Eric Smith)
Subject: Re: plotting graph
Message-Id: <slrn8o16h0.7ov.eric@plum.fruitcom.com>

dVoon posted
 > Hi all,
 > 
 > I know how to use Perl to retrieve data from database and then generate
 > an HTML table. But is there a way of using Perl to plot graphs (e.g.
 > line graph showing composite index) and send the graph to HTML client? I
 > thought of using Perl to retrieve the data and send it to a java applet
 > (which plots graphs) as argument, but since I don't know java, are there
 > other ways to do it?

 install GD::Graph from CPAN.  The latest version outputs png - there are a
 number of example acripts each making a specific type of graph -its great. 


-- 
Eric Smith
eric@fruitcom.com


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

Date: 27 Jul 2000 18:04:55 EDT
From: abigail@foad.org (Abigail)
Subject: Re: plotting graph
Message-Id: <slrn8o1cfv.vcg.abigail@alexandra.foad.org>

Eric Smith (eric@fruitcom.com) wrote on MMDXXII September MCMXCIII in
<URL:news:slrn8o16h0.7ov.eric@plum.fruitcom.com>:
{} dVoon posted
{}  > Hi all,
{}  > 
{}  > I know how to use Perl to retrieve data from database and then generate
{}  > an HTML table. But is there a way of using Perl to plot graphs (e.g.
{}  > line graph showing composite index) and send the graph to HTML client? I
{}  > thought of using Perl to retrieve the data and send it to a java applet
{}  > (which plots graphs) as argument, but since I don't know java, are there
{}  > other ways to do it?
{} 
{}  install GD::Graph from CPAN.  The latest version outputs png - there are a
{}  number of example acripts each making a specific type of graph -its great. 


Or one could use gnuplot, that has a gazillion drivers for different
formats, PNG being one of them.


Abigail
-- 
print v74.117.115.116.32;
print v97.110.111.116.104.101.114.32;
print v80.101.114.108.32;
print v72.97.99.107.101.114.10;


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

Date: Thu, 27 Jul 2000 18:25:24 GMT
From: Michael Ransburg <daneel@tux.org>
Subject: Problem with Apache & win32::pipe
Message-Id: <8lpuqf$uf9$1@nnrp1.deja.com>



Hi :)

I'm running winnt 4.0 with the latest versions of Apache, Activeperl
and the win32::pipe module.

The following code works fine if I call it directly through the command
shell:

CLIENT:
#!c:\perl\bin\perl.exe

use Win32::Pipe;
$PipeName = "\\\\ente\\pipe\\Hyperpipe";
if( $Pipe = new Win32::Pipe( $PipeName ) ) {
	my $in;
	$Pipe->Write( "blah\n" );
	$Pipe->Close();
}
else {print "Error connecting: " . Win32::FormatMessage(
$Win32::Pipe::Error ) . "\n";}

SERVER:
#!c:\perl\bin\perl.exe

use Win32::Pipe;
$PipeName = "Hyperpipe";
$| = 1;
my $bServerContinue = 1;
if( $Pipe = new Win32::Pipe( $PipeName ) ) {
	while ($bServerContinue) {
		print "Waiting for a client to connect...\n";

    		if ($Pipe->Connect()) {
    			my $in;
    			$in = $Pipe->Read();
    			print $in;
			$Pipe->Disconnect();
    		}
    	}
    	$Pipe->Close();
}

But as soon as I try to call the client through apache, I get the error
message "Error Connecting: Process ended successfully" (I translated
this from german), so it means the else condition of the client is
executed, giving me a rather strange error message.

I added
use CGI;
$myhelper = new CGI;
print $myhelper->header();

to the client (at the correct positions of course). My configuration is
ok, everything else works like a charme.

I thought it might be a security thing, because the scripts
gets 'called' from apache, but roths' website says that a new pipe is
created without any security restrictions.

I'm out of ideas, and Roths' Homepage, deja and other resources didn't
help me up to now. Could anyone help me out on this one?

thanks!



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 27 Jul 2000 12:43:52 -0700
From: rmahoney249 <rmahoneyNOrmSPAM@infotech-nj.com.invalid>
Subject: Re: Problem with oracle cursors
Message-Id: <0d2532ae.78808618@usw-ex0101-006.remarq.com>

This works - it's right out of the DBD::Oracle  documetation -
had to tweak a little:
*************************************
#!/usr/local/bin/perl
use DBI;
use DBD::Oracle qw(:ora_types);

$dbh = DBI->connect('DBI:Oracle:','user/passwd@instance') || die
"Cannot connect to Oracle\n";
$sth1 = $dbh->prepare(q{
BEGIN OPEN :cursor FOR
        SELECT table_name, tablespace_name
        FROM user_tables WHERE tablespace_name = :space;
END;
});
$sth1->bind_param(":space", "USERS");
my $sth2;
$sth1->bind_param_inout(":cursor", \$sth2, 0, { ora_type =>
ORA_RSET } );
$sth1->execute();
# $sth2 is now a valid DBI statement handle for the cursor
while ( @row = $sth2->fetchrow_array ) {
        print "@row\n";

}

*********************************
That's the whole thing.  Also,  don't bother with the Oraperl
stuff its OLD and deprecated.


Cheers,
Ron


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

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



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

Date: Thu, 27 Jul 2000 12:51:37 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: regexp match inside a time interval ?
Message-Id: <MPG.13ea329f29f83e0e98abf5@nntp.hpl.hp.com>

In article <8lootb$20c$1@nnrp1.deja.com> on Thu, 27 Jul 2000 07:38:19 
GMT, man@rila.bg <man@rila.bg> says...
> Hello All, need a help, question follows:
>   I want if some regexp has not matched for a specified time(1-2 secs),
> then the match statement should be interrupted(some flag set) and
> script continues the statement after regexp match.
> 
> example of what I need:
> 
> if( m/complex regexp over huge string(file)/ ) {
>   #ok
> }
> 
> if( $failure_flag ) { # if failure, then flag is set
>   #failure
> }

perlfaq8: "How do I timeout a slow event?"

>               best regards , margarit nickolov.
> 
> I apologize for bad english :(

No problem, compared to my Bulgarian!

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Jul 2000 21:31:45 +0200
From: Jakob Schmidt <sumus@aut.dk>
Subject: Re: return value of `eval "use lib"'
Message-Id: <aef3v07y.fsf@macforce.sumus.dk>

Bart Lateur <bart.lateur@skynet.be> writes:

> Sweth Chandramouli wrote:
> 
> >eval "use lib qw(@INC_DIRS)" or
> >   die "Couldn't use libs in \@INC_DIRS!";
[...]
> As for the "eval", It's not such a great idea, if you're not sure you're
> using a syntax for which ALL imported functions have parentheses for
> their calls. For example,

Which doesn't matter in the specific case of use lib (?)

> For example, fill your @INC_DIRS in a BEGIN block, in front of the "use
> lib" line.

Whether that's possible depends on the source of the @INC_DIRS info, I guess.

-- 
Jakob


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

Date: Thu, 27 Jul 2000 21:32:22 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: return value of `eval "use lib"'
Message-Id: <kga1os89mi05dlnnnnm2a28mv5k480nqam@4ax.com>

Jakob Schmidt wrote:

>> As for the "eval", It's not such a great idea, if you're not sure you're
>> using a syntax for which ALL imported functions have parentheses for
>> their calls.
>
>Which doesn't matter in the specific case of use lib (?)

No. But postponing "use lib" implies that you intend to postpone loading
some other library files as well; unless you're loading them with
require() instead of use()? For those files, it may apply.

-- 
	Bart.


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

Date: Thu, 27 Jul 2000 11:06:21 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: shifting strings
Message-Id: <8lptkv$eim$1@brokaw.wa.com>


Ilmari Karonen <iltzu@sci.invalid> wrote in message
news:964700229.5801@itz.pp.sci.fi...
> In article <8lnucq$f3r$1@brokaw.wa.com>, Lauren Smith wrote:
> >$tmp = $str1;                    # Store $str1 for later
> >$str2 = chop $str1;              # Get the first character of $str1
> >$str1 = $tmp;                    # Restore $str1
> >($str1, $str2) = ($str2, $str1); # Swap $str1, $str2
>
> Is this one more example of "Perl Bowling"?  Why not use:
>
>   chop($str2 = $str1);

:-D

It was meant to be clear.  I'd hate to spend the next few days explaining
why $str1 doesn't get chopped, but $str2 does.

But then again, if you want to bowling:

$str1 = "abcd";
chop ($str2 = join ('', split //, $str1));

Lauren
(I've always had a very low bowling average, but a high golf
handicap...*sigh*)









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

Date: Thu, 27 Jul 2000 12:05:50 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Suggestion for syntax change
Message-Id: <MPG.13ea27ebac967a1d98abf4@nntp.hpl.hp.com>

In article <964707568.2037@itz.pp.sci.fi> on 27 Jul 2000 14:24:14 GMT, 
Ilmari Karonen <iltzu@sci.invalid> says...
> In article <MPG.13eaa2e8babbb2cb989692@news>, jason wrote:
> >HOWEVER .. it doesn't solve the behaviour that Keith is proposing where 
> >within list index context the negative arguments of '..' are evaluated 
> >first (to be indices relative to the end of the list) and THEN the '..' 
> >is evaluated to produce a forward list
> 
> ..for which I've already proposed a better (less klugy) alternative,
> namely having a special variable contain the last index of the list
> for the innermost surrounding [].
> 
> This wouldn't break existing code, which Keith's proposal might do.
> It also involves less magic, and is therefore easier to understand.

Once again, coming in at the tail end without full knowledge of the 
discussion:

One could readily write a simple function that does what is desired:

#!/usr/bin/perl -w
use strict;

my @a = qw( a b c d e );

sub slice (\@$$) {
    my ($aref, $first, $last) =  @_;
    @$aref[($first >= 0 ? $first : @$aref + $first) ..
           ($last  >= 0 ? $last  : @$aref + $last )]
}

my @slice = slice @a, 1, -2;

print "@slice\n";
__END__


But doing this transformation only in the context of array-slice 
subscripting would be very DWIMmish, so in the spirit of Perl.  Perhaps 
this should be considered for Perl 6, where code compatibility is not an 
inhibitor.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 27 Jul 2000 14:19:38 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Suggestion for syntax change
Message-Id: <39808B4A.8C68A16@mindspring.com>

jason wrote:
> 
> Larry Rosler writes ..
> >In article <397F10C7.8BE8C5B@mindspring.com> on Wed, 26 Jul 2000
> >11:24:39 -0500, Keith G. Murphy <keithmur@mindspring.com> says...
> >
> >...
> >
> >> Wouldn't:
> >>
> >> for ($last downto $first) { }
> >>
> >> be a sweet thing to be able to do?  :-)
> >
> >This thread has been going on for a long time, and I have been away for
> >much of it and haven't caught up.  So please forgive my presumption in
> >wondering whether the following has been considered adequately:
> >
> >  for (reverse $first .. $last) { }
> >
> >At the cost of one more (efficient) operation, doesn't this accomplish
> >all that the proposed new syntax is inted to provide?

Larry, you make me feel like you've come home unexpectedly and caught
Jason and me doing unnatural things to the cat.  :-)
> 
> actually that does replace all proposed behaviour of my original idea
> (where LIST[2..-1] is equivalent to LIST[2,1,0,-1]) which I've now
> abandoned
> 
> I had never tried and didn't really realise that you could call
> functions like reverse within list indexes

I think 'reverse' *may* have gone through my mind at some point; I
remember thinking I might try it just to see what it would do...
> 
> HOWEVER .. it doesn't solve the behaviour that Keith is proposing where
> within list index context the negative arguments of '..' are evaluated
> first (to be indices relative to the end of the list) and THEN the '..'
> is evaluated to produce a forward list
> 
Thank you for summing that all up so nicely, better than I ever had. 
:-)

What I really like about being able to do, say, @list[0..-2] with the
behavior I spoke of (-2 would "magically" be the penultimate element) is
that it seems to me quite *consistent* with the magical behavior of
@list[-2].

I.e., this is something I actually started to do one day, then was
surprised when it didn't DWIM.

Look at it another way.  Given, for example's sake, a 3-element list:

@list[0,1,2]
@list[0,1,-1]
@list[0..2]

all mean the same thing, but

@list[0..-1]

is the odd man out.  I'd like the behavior to be more consistent, not
introduce some confusing and extraneous magic.


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

Date: 27 Jul 2000 20:43:25 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Suggestion for syntax change
Message-Id: <964729581.5445@itz.pp.sci.fi>

In article <MPG.13ea27ebac967a1d98abf4@nntp.hpl.hp.com>, Larry Rosler wrote:
>In article <964707568.2037@itz.pp.sci.fi> on 27 Jul 2000 14:24:14 GMT, 
>Ilmari Karonen <iltzu@sci.invalid> says...
>> ..for which I've already proposed a better (less klugy) alternative,
>> namely having a special variable contain the last index of the list
>> for the innermost surrounding [].
>
>One could readily write a simple function that does what is desired:

Indeed, but that's not particularly flexible.  A special variable like
I propose - I'll use $# here because it looks appropriate, even though
it already has one deprecated and one proposed meaning - would allow
list slices such as (LIST)[0, 3 .. $# - 2] to extract all except the
second, third, and last two elements of the list.

It would also nicely handle more complex cases, like (LIST)[$# / 2] to
get the middle element of a list of undeterminate length, or even

  (LIST)[grep 1x$_ =~ /^(11+)\1+$/ => 4 .. $#] 

to extract only the composite-numbered elements of such a list.  Of
course the will be minor problems if there are multiple nested list
slices, but they are no worse than with $_ in nested maps.  Besides,
all the proposals so far have had that problem, and I believe it is
fundamentally unavoidable.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method."  -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: 27 Jul 2000 18:45:24 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: To sys op - get me off your email list
Message-Id: <964723305.17124@itz.pp.sci.fi>

In article <3980781C.71CA296C@spamny.email.gs.com>, Wildman, Elie wrote:
>If you don't want perl news from this group what do you wnat?
>
>Gerald Newton wrote:
> I do not want any email about
>
>> perl from this news group.
>> Gerald Newton

YHBT.  HTH, HAND.

[Jeopardectomy deemed futile - this thread is dead anyway.]

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method."  -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: Thu, 27 Jul 2000 10:57:51 -0700
From: Mike Huang-R52270 <r52270@email.sps.mot.com>
Subject: Uploading files from a Win9x computer
Message-Id: <3980781F.DA1FE5AD@email.sps.mot.com>

When uploading files from a Win9x computer, the file is saved with the
full path.

Ex. D:\Folder\Temp\a_file.txt

I don't get this problem from a unix box. On a unix, i only get (
a_file.txt ), not the whole path.
I am using Perl's CGI module, and following the examples in the manpage.

Anyone know how to fix this?



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

Date: Thu, 27 Jul 2000 15:33:06 -0500 (CDT)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: Was Why won't  "use strict;"  work?
Message-Id: <29810-39809C82-5@storefull-247.iap.bryant.webtv.net>

Thanks Keith,
As you surmised, I didn't realize that was posted in HTML. I changed my
settings to plain text for that post. Don't know why it didn't work.
Anyway, I'll check that out on my PC and try to be more careful, or just
post from this WebTV in the future. Thanks for letting me know exactly
what the problem was.

Regards,
Dennis



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

Date: Thu, 27 Jul 2000 20:31:38 GMT
From: dakotamitchell@my-deja.com
Subject: what is the best way to search multiple files?
Message-Id: <8lq67a$4fe$1@nnrp1.deja.com>

Here is my situation:
I have an input file which contains some 170,000 unique records.
I also have 36 additional files (labeled filename1, filename2, ...,
filename36) in which the records from the input file are contained but
each record is not in each file.  I need to take the input file, read
through it record by record, then find all of the matches in the 36
files for each record and output to another file.  Each line in the
output file will contain the record from the input file followed by all
of the values found in the other 36 files.  So if the first record from
the input file was "1234ABCD" and that record was in 2 of the other 36
files (files 1 and 4) with values of 11 and 22, the output file for that
record would read:
     1234ABCD11000022000000000000000000000000000000000000  etc

Currently I can make this work by reading the input file one line at a
time and then grepping for that record in each of the other 36 files.
If a match is found, I right the value from that file to the output file
otherwise I output "00".  The trouble is that based on my estimates, it
will take about 30 hours for the script to parse through 170,000
records.  I have to think that there is a better way to do this as grep
isn't particularly fast.  Here is the guts of my script:


@result=`/usr/bin/grep "$key" db1.unit.generic*` ; #key is the record
chomp(@result) ;

$y=0 ;

for ( $x=1 ; $x<37 ; $x++ ) { #to step through the 36 files

     print "Result $y is $result[$y] \n" ;

     $mon_num=substr($result[$y],16,2) ; chomp($mon_num) ;
     print "Month num is $mon_num\n" ;
     if ( $mon_num < 10 ) {
          $mon_num =~ s/0// ;
     }
     print "** Month num is $mon_num\n" ;

     $demand=substr($result[$y],-8) ; chomp($demand) ;

     if ( $x == $mon_num ) { # if true, means found a match to key
                             #  in some of the 36 files

          print OUTPUT "$demand" ;
          $y++ ;

     }
     else {

          print OUTPUT "00000000" ;

     }
}

This way, I am grepping through 36 files each time I read a new record
in from the input file.  Any help would be appreciated.

Thanks


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 27 Jul 2000 13:00:57 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Why doesn't my Perl script execute?
Message-Id: <MPG.13ea34d5f1258c3898abf6@nntp.hpl.hp.com>

In article <8lpaou$dpo$1@nnrp1.deja.com> on Thu, 27 Jul 2000 12:43:11 
GMT, Rodney Engdahl <red_orc@my-deja.com> says...
> In article <8lp4s0$9mq$1@nnrp1.deja.com>,
>   apolinad@my-deja.com wrote:
> 
> > Internal Server Error
> > Premature end of script headers
> 
> possibly because you have _no_ script headers.  if you are using the CGI
> module,  make sure you are printing header
> 
> If not, make sure your first print statement is:
> 
> print "Content-type: text/html\n\n";

That won't help, because the program doesn't compile (see below), so it 
doesn't get into execution to print the header.

> > Besides, when I tried checking for syntax errors on the remote system
> > (using Telnet), I got the following messages:
> >
> > Illegal modulus of constant 0 in "inputvars="
> > Syntax error "my $count"

That smacks of Perl 4.

To the Original Poster:

Try running the following CGI program:

#!/usr/bin/perl
print "Content-type: text/plain\n\nPerl version = $]\n";

Or whatever path to perl you are using.

Then ask the system administrator where Perl 5 is located.

> > where, "inputvars=" was declared as :
> >     my %inputvars = &read_query_string;
> >
> 
> are you certain there is no space between % and inputvars?

What difference would that make?  perl sees them as separate tokens, so 
white space is irrelevant (though no one uses any there -- bad golf, you 
know!).

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Jul 2000 20:55:25 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Why doesn't my Perl script execute?
Message-Id: <964730868.8216@itz.pp.sci.fi>

In article <MPG.13ea34d5f1258c3898abf6@nntp.hpl.hp.com>, Larry Rosler wrote:
>What difference would that make?  perl sees them as separate tokens, so 
>white space is irrelevant (though no one uses any there -- bad golf, you 
 ^^^^^^^^^^^^^^^^^^^^^^^^^

Sometimes.  It's not in the perldocs, but grepping the Camel book (or
Deja, as I've already quoted that bit once) for "weird parsing rules"
can provide an interesting example.

Hmm, it seems that quote was also in response to one of your posts, so
presumably this is old news to you, but maybe one of the newbies will
be suitable enlightened by it.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method."  -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: Thu, 27 Jul 2000 21:05:53 -0000
From: "Steve C" <steve@i66.net>
Subject: Win32 Perl on NT: Domain Sync-ing
Message-Id: <3980a48f$0$7045@wodc7nh6.news.uu.net>

Is there some way of having a perl script running with Admin Privs issue a
'Synchronize Entire Domain' command to the Primary DC in an NT domain?

Thanks

S.




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

Date: Thu, 27 Jul 2000 21:10:07 -0000
From: "Steve C" <steve@i66.net>
Subject: Win32: Profiles for terminal server
Message-Id: <3980a58d$0$7049@wodc7nh6.news.uu.net>

I'm looking for the best way to manipulate profile information for Terminal
Server. The NetAdmin and AdminMisc almost give me everything I need, but I
need a way to set the Terminal Server Profile directory.

Can anyone point me to a Module that might accomplish this?

Thanks

S.




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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 3825
**************************************


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