[24925] in Perl-Users-Digest
Perl-Users Digest, Issue: 7175 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 25 00:06:48 2004
Date: Fri, 24 Sep 2004 21:05:11 -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 Fri, 24 Sep 2004 Volume: 10 Number: 7175
Today's topics:
Continous Looping of a List <cpryce@nospam.pryce.net>
Re: Continous Looping of a List <mritty@gmail.com>
Re: Continous Looping of a List <cpryce@nospam.pryce.net>
Re: Continous Looping of a List <brian_helterline@hp.com>
Re: Continous Looping of a List <postmaster@castleamber.com>
Re: Continous Looping of a List <postmaster@castleamber.com>
Re: Continous Looping of a List <mritty@gmail.com>
Re: Continous Looping of a List <mritty@gmail.com>
Re: Continous Looping of a List <mritty@gmail.com>
Re: Continous Looping of a List <junk@blackwater-pacific.com>
Re: Counting most frequently-occurring n-grams in a fil (Larry Felton Johnson)
Re: Counting most frequently-occurring n-grams in a fil <_>
Re: DBI::ODBC Remote Login to Server <ackcomm@comcast.net>
Re: Help with my brute force method (krakle)
matching devious non ascii spam strings <jidanni@jidanni.org>
Re: matching devious non ascii spam strings <matternc@comcast.net>
perlXStut (Ketema)
Re: Permagick Fonts <vticau@excite.com>
Re: Problem printing array content with CGI (Simon L)
Re: Problem printing array content with CGI <junk@blackwater-pacific.com>
Re: what module could easiely load all files to a @arra <bart.lateur@pandora.be>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 24 Sep 2004 14:08:11 -0500
From: cp <cpryce@nospam.pryce.net>
Subject: Continous Looping of a List
Message-Id: <240920041408114571%cpryce@nospam.pryce.net>
I have a list of ids from a database, and a value for the currently
selected value. I need the previous value (or the index of the previous
value) and the next value in the list.
The ids will not neccessarily be in sequence. The function is called
once, so the original list does not need to be preserved. The list is
arbitrarily long.
I.e., given a list: 1, 3, 5, 7, 9 and the currently selected id is
value is 5, I need 3 and 7.
I came up with the following, and I have 2 basic questions:
1) is this the best solution?
2) How would I add error checking? I need to abort if the value passed
in is not part of the list, and I only want to check that once, not on
every recursion.
use strict;
use warnings;
my @ids = qw( 1 3 5 7 9 );
# testing
for( qw(3 5 9 7 1) ) {
print join("\t", array_nav( $_, @ids )), "\n";
}
exit(0);
sub array_nav {
my ($val, @ids) = @_;
my $test = shift @ids;
return ( $ids[-1], $ids[0] ) if $test == $val;
push @ids, $test;
array_nav( $val, @ids);
}
--
cp
------------------------------
Date: Fri, 24 Sep 2004 19:53:14 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Continous Looping of a List
Message-Id: <KW_4d.173$va.125@trndny03>
"cp" <cpryce@nospam.pryce.net> wrote in message
news:240920041408114571%cpryce@nospam.pryce.net...
> I have a list of ids from a database, and a value for the currently
> selected value. I need the previous value (or the index of the
previous
> value) and the next value in the list.
>
> The ids will not neccessarily be in sequence. The function is called
> once, so the original list does not need to be preserved. The list is
> arbitrarily long.
>
> I.e., given a list: 1, 3, 5, 7, 9 and the currently selected id is
> value is 5, I need 3 and 7.
>
> I came up with the following, and I have 2 basic questions:
> 1) is this the best solution?
Probably not. Most every algorithm using recursion can better be wrtten
without recursion. This one included.
> 2) How would I add error checking? I need to abort if the value passed
> in is not part of the list, and I only want to check that once, not on
> every recursion.
I've added error checking to my solution. See below.
> use strict;
> use warnings;
>
> my @ids = qw( 1 3 5 7 9 );
>
> # testing
> for( qw(3 5 9 7 1) ) {
> print join("\t", array_nav( $_, @ids )), "\n";
> }
>
> exit(0);
>
> sub array_nav {
> my ($val, @ids) = @_;
>
> my $test = shift @ids;
> return ( $ids[-1], $ids[0] ) if $test == $val;
>
> push @ids, $test;
> array_nav( $val, @ids);
> }
My version of your function:
sub array_nav {
my ($val, @ids) = @_;
my $pos;
for ($pos=0; $pos<=$#ids; $pos++){
last if $val == $ids[$pos];
}
return undef unless $pos < @ids; #error checking
my $prev = $ids[$pos-1];
my $next = $pos == $#ids ? $ids[0] : $ids[$pos+1];
return ($prev, $next);
}
We simply traverse the list once, stopping when we find the correct
item. Then we find the previous and following values of the list.
Hope this Helps,
Paul Lalli
------------------------------
Date: Fri, 24 Sep 2004 15:07:58 -0500
From: cp <cpryce@nospam.pryce.net>
Subject: Re: Continous Looping of a List
Message-Id: <240920041507585262%cpryce@nospam.pryce.net>
In article <KW_4d.173$va.125@trndny03>, Paul Lalli <mritty@gmail.com>
wrote:
> > I have a list of ids from a database, and a value for the currently
> > selected value. I need the previous value (or the index of the
> previous
> > value) and the next value in the list.
> >
> > The ids will not neccessarily be in sequence. The function is called
> > once, so the original list does not need to be preserved. The list is
> > arbitrarily long.
> >
> > I.e., given a list: 1, 3, 5, 7, 9 and the currently selected id is
> > value is 5, I need 3 and 7.
My very bad. In my original problem statement, I neglected to mention
that I need the loop to be continuous. So if the current selected id is
9, the functions needs to return 7 and 1. If the current selection is
1, it needs to return 9 and 3.
> >
> > I came up with the following, and I have 2 basic questions:
> > 1) is this the best solution?
>
> Probably not. Most every algorithm using recursion can better be wrtten
> without recursion. This one included.
>
> > 2) How would I add error checking? I need to abort if the value passed
> > in is not part of the list, and I only want to check that once, not on
> > every recursion.
>
> I've added error checking to my solution. See below.
>
> > use strict;
> > use warnings;
> >
> > my @ids = qw( 1 3 5 7 9 );
> >
> > # testing
> > for( qw(3 5 9 7 1) ) {
> > print join("\t", array_nav( $_, @ids )), "\n";
> > }
> >
> > exit(0);
> >
> > sub array_nav {
> > my ($val, @ids) = @_;
> >
> > my $test = shift @ids;
> > return ( $ids[-1], $ids[0] ) if $test == $val;
> >
> > push @ids, $test;
> > array_nav( $val, @ids);
> > }
>
> My version of your function:
>
> sub array_nav {
> my ($val, @ids) = @_;
> my $pos;
> for ($pos=0; $pos<=$#ids; $pos++){
> last if $val == $ids[$pos];
> }
> return undef unless $pos < @ids; #error checking
Yes. I see what you are doing. however, I was hoping for error checking
to determine whether the selected id was part of the set Before
looping. May fault for not stating the problem more clearly.
> my $prev = $ids[$pos-1];
> my $next = $pos == $#ids ? $ids[0] : $ids[$pos+1];
> return ($prev, $next);
> }
>
--
cp
------------------------------
Date: Fri, 24 Sep 2004 13:12:35 -0700
From: "Brian Helterline" <brian_helterline@hp.com>
Subject: Re: Continous Looping of a List
Message-Id: <41548067$1@usenet01.boi.hp.com>
"Paul Lalli" <mritty@gmail.com> wrote in message
news:KW_4d.173$va.125@trndny03...
> "cp" <cpryce@nospam.pryce.net> wrote in message
> news:240920041408114571%cpryce@nospam.pryce.net...
> > I have a list of ids from a database, and a value for the currently
> > selected value. I need the previous value (or the index of the
> previous
> > value) and the next value in the list.
> >
> > The ids will not neccessarily be in sequence. The function is called
> > once, so the original list does not need to be preserved. The list is
> > arbitrarily long.
> >
> > I.e., given a list: 1, 3, 5, 7, 9 and the currently selected id is
> > value is 5, I need 3 and 7.
> >
> > I came up with the following, and I have 2 basic questions:
> > 1) is this the best solution?
>
> Probably not. Most every algorithm using recursion can better be wrtten
> without recursion. This one included.
>
> > 2) How would I add error checking? I need to abort if the value passed
> > in is not part of the list, and I only want to check that once, not on
> > every recursion.
>
> I've added error checking to my solution. See below.
>
> > use strict;
> > use warnings;
> >
> > my @ids = qw( 1 3 5 7 9 );
> >
> > # testing
> > for( qw(3 5 9 7 1) ) {
> > print join("\t", array_nav( $_, @ids )), "\n";
> > }
> >
> > exit(0);
> >
> > sub array_nav {
> > my ($val, @ids) = @_;
> >
> > my $test = shift @ids;
> > return ( $ids[-1], $ids[0] ) if $test == $val;
> >
> > push @ids, $test;
> > array_nav( $val, @ids);
> > }
>
> My version of your function:
>
> sub array_nav {
> my ($val, @ids) = @_;
> my $pos;
> for ($pos=0; $pos<=$#ids; $pos++){
> last if $val == $ids[$pos];
> }
> return undef unless $pos < @ids; #error checking
> my $prev = $ids[$pos-1];
This can evaluate to $ids[-1] for the first element.
The OP may not want this wrap-around.
my $prev = $pos == 0 ? $ids[0] : $ids[$pos-1];
-brian
------------------------------
Date: 24 Sep 2004 20:53:07 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Continous Looping of a List
Message-Id: <Xns956EA18C650D1castleamber@130.133.1.4>
"Paul Lalli" <mritty@gmail.com> wrote in news:KW_4d.173$va.125@trndny03:
> "cp" <cpryce@nospam.pryce.net> wrote in message
> news:240920041408114571%cpryce@nospam.pryce.net...
>> I have a list of ids from a database, and a value for the currently
>> selected value. I need the previous value (or the index of the
> previous
>> value) and the next value in the list.
>>
>> The ids will not neccessarily be in sequence. The function is called
>> once, so the original list does not need to be preserved. The list is
>> arbitrarily long.
>>
>> I.e., given a list: 1, 3, 5, 7, 9 and the currently selected id is
>> value is 5, I need 3 and 7.
>>
>> I came up with the following, and I have 2 basic questions:
>> 1) is this the best solution?
>
> Probably not. Most every algorithm using recursion can better be wrtten
> without recursion. This one included.
A smart compiler removes tail recursion, so in many cases your "probably
not" is wrong. (This is a case of tail recursion, btw).
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: 24 Sep 2004 20:55:19 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Continous Looping of a List
Message-Id: <Xns956EA1F523E2Bcastleamber@130.133.1.4>
cp <cpryce@nospam.pryce.net> wrote in news:240920041408114571%
cpryce@nospam.pryce.net:
> I have a list of ids from a database, and a value for the currently
> selected value. I need the previous value (or the index of the previous
> value) and the next value in the list.
Why don't you keep this relation *in* the database? Then you can get it in
O(1) time.
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: Fri, 24 Sep 2004 19:41:43 -0400
From: Paul Lalli <mritty@gmail.com>
Subject: Re: Continous Looping of a List
Message-Id: <cj2bca$sk$1@misc-cct.server.rpi.edu>
cp wrote:
> My very bad. In my original problem statement, I neglected to mention
> that I need the loop to be continuous. So if the current selected id is
> 9, the functions needs to return 7 and 1. If the current selection is
> 1, it needs to return 9 and 3.
>
The output of my function is identical to the output of your funciton,
including returning the 2nd and last element when given the first. Can
you explain to me what your function does that mine does not?
Did you try to run my function, or are you just making an assumption it
doesn't do what you want?
> In article <KW_4d.173$va.125@trndny03>, Paul Lalli <mritty@gmail.com>
> wrote:
>
>>My version of your function:
>>
>>sub array_nav {
>> my ($val, @ids) = @_;
>> my $pos;
>> for ($pos=0; $pos<=$#ids; $pos++){
>> last if $val == $ids[$pos];
>> }
>> return undef unless $pos < @ids; #error checking
>
>
> Yes. I see what you are doing. however, I was hoping for error checking
> to determine whether the selected id was part of the set Before
> looping. May fault for not stating the problem more clearly.
>
The question here is "why?" Assuming you do have some sort of valid
reason for this, checkout the Perl FAQ:
perldoc -q contained
>
>> my $prev = $ids[$pos-1];
>> my $next = $pos == $#ids ? $ids[0] : $ids[$pos+1];
>> return ($prev, $next);
>>}
Paul Lalli
------------------------------
Date: Fri, 24 Sep 2004 19:43:26 -0400
From: Paul Lalli <mritty@gmail.com>
Subject: Re: Continous Looping of a List
Message-Id: <cj2bfg$sk$2@misc-cct.server.rpi.edu>
Brian Helterline wrote:
> "Paul Lalli" <mritty@gmail.com> wrote in message
> news:KW_4d.173$va.125@trndny03...
>
>>"cp" <cpryce@nospam.pryce.net> wrote in message
>>news:240920041408114571%cpryce@nospam.pryce.net...
>>
>>>use strict;
>>>use warnings;
>>>
>>>my @ids = qw( 1 3 5 7 9 );
>>>
>>># testing
>>>for( qw(3 5 9 7 1) ) {
>>> print join("\t", array_nav( $_, @ids )), "\n";
>>>}
>>>
>>>exit(0);
>>>
>>>sub array_nav {
>>> my ($val, @ids) = @_;
>>>
>>> my $test = shift @ids;
>>> return ( $ids[-1], $ids[0] ) if $test == $val;
>>>
>>> push @ids, $test;
>>> array_nav( $val, @ids);
>>>}
>>
>>My version of your function:
>>
>>sub array_nav {
>> my ($val, @ids) = @_;
>> my $pos;
>> for ($pos=0; $pos<=$#ids; $pos++){
>> last if $val == $ids[$pos];
>> }
>> return undef unless $pos < @ids; #error checking
>> my $prev = $ids[$pos-1];
>
>
> This can evaluate to $ids[-1] for the first element.
> The OP may not want this wrap-around.
> my $prev = $pos == 0 ? $ids[0] : $ids[$pos-1];
>
Did you try running the OP's code? This is exactly what the OP does
want. I *believe* this is what hte OP meant by "continuous".
Paul Lalli.
------------------------------
Date: Fri, 24 Sep 2004 19:44:09 -0400
From: Paul Lalli <mritty@gmail.com>
Subject: Re: Continous Looping of a List
Message-Id: <cj2bgs$sk$3@misc-cct.server.rpi.edu>
John Bokma wrote:
> "Paul Lalli" <mritty@gmail.com> wrote in news:KW_4d.173$va.125@trndny03:
>
>
>>"cp" <cpryce@nospam.pryce.net> wrote in message
>>news:240920041408114571%cpryce@nospam.pryce.net...
>>
>>>I.e., given a list: 1, 3, 5, 7, 9 and the currently selected id is
>>>value is 5, I need 3 and 7.
>>>
>>>I came up with the following, and I have 2 basic questions:
>>>1) is this the best solution?
>>
>>Probably not. Most every algorithm using recursion can better be wrtten
>>without recursion. This one included.
>
>
> A smart compiler removes tail recursion, so in many cases your "probably
> not" is wrong. (This is a case of tail recursion, btw).
>
I don't understand what you mean by this. Can you please explain?
Thank you,
Paul Lalli
------------------------------
Date: Fri, 24 Sep 2004 20:56:14 -0700
From: Steve May <junk@blackwater-pacific.com>
Subject: Re: Continous Looping of a List
Message-Id: <10l9r0d32ds1jad@corp.supernews.com>
cp wrote:
> I have a list of ids from a database, and a value for the currently
> selected value. I need the previous value (or the index of the previous
> value) and the next value in the list.
>
> The ids will not neccessarily be in sequence. The function is called
> once, so the original list does not need to be preserved. The list is
> arbitrarily long.
>
> I.e., given a list: 1, 3, 5, 7, 9 and the currently selected id is
> value is 5, I need 3 and 7.
>
> I came up with the following, and I have 2 basic questions:
> 1) is this the best solution?
> 2) How would I add error checking? I need to abort if the value passed
> in is not part of the list, and I only want to check that once, not on
> every recursion.
>
>
> use strict;
> use warnings;
>
> my @ids = qw( 1 3 5 7 9 );
>
> # testing
> for( qw(3 5 9 7 1) ) {
> print join("\t", array_nav( $_, @ids )), "\n";
> }
>
> exit(0);
>
> sub array_nav {
> my ($val, @ids) = @_;
>
> my $test = shift @ids;
> return ( $ids[-1], $ids[0] ) if $test == $val;
>
> push @ids, $test;
> array_nav( $val, @ids);
> }
>
Sometimes recursion is slick, but this is probably not
one of those times. :-)
Perhaps something like the below might work. The only thing
that worries me is you stated the list is 'arbitrarily long'.
What does that mean? The below assumes the whole list will
fit comfortably in memory. If not, well.....
#! /usr/bin/perl -w
use strict;
my @ids = qw( 1 3 5 7 9 );
my $testval = 1;
# testing, note the bogus number
for( qw( 3 5 9 7 1 35 ) ) {
my @rv = array_nav( $_, @ids );
# this might work better as an if/else block
# in real life, but for now...
@rv == 2 ? print "$rv[0]\t$rv[1]\n"
: print "$rv[0]\n";
}
sub array_nav {
my ( $val, @ids ) = @_;
# *might* want to check $val and/or @ids before
# we start the loop, that's up to you
my $ct = -1;
for( @ids ){
$ct++;
$_ == $val or next;
$ct == $#ids ? return ( $ids[$ct-1], $ids[0] )
: return ( $ids[$ct-1], $ids[$ct+1] );
}
# didn't find it, obviously...
return "Error: $val not found in list";
}
And our results...
[steve@linux steve]$ ./test_array.pl
1 5
3 7
7 1
5 9
9 3
Error: 35 not found in list
hth, \s
------------------------------
Date: 24 Sep 2004 11:54:19 -0700
From: larryj@gsu.edu (Larry Felton Johnson)
Subject: Re: Counting most frequently-occurring n-grams in a file (or over multiple files)
Message-Id: <4ae7bf57.0409241054.2e2d081@posting.google.com>
"C3" <_> wrote in message news:<41542a17$0$23897$afc38c87@news.optusnet.com.au>...
> Hmm, seems to run on the command-line, but it produces no output for me.
What sort of environment are you running it in? I cut and pasted his
oneliner and ran it against a number of files on my workstation, and it
worked right away. I haven't really checked the output carefully, but
on trivial files of character sequences it seems to work as I'd expect.
Larry
------------------------------
Date: Sat, 25 Sep 2004 10:31:09 +1000
From: "C3" <_>
Subject: Re: Counting most frequently-occurring n-grams in a file (or over multiple files)
Message-Id: <4154bc4c$0$20129$afc38c87@news.optusnet.com.au>
> Are n-grams restricted to characters on a single line or can they flow
> onto the next line? (or even next file?) In the latter case, are the
> newline character(s) part of the n-gram?
n-grams are sequences of bytes, not ASCII characters, so line feeds and
carriage returns are treated like any other character. n-grams may not flow
onto other files.
cheers,
------------------------------
Date: Fri, 24 Sep 2004 16:37:46 -0500
From: Fred Goldberg <ackcomm@comcast.net>
Subject: Re: DBI::ODBC Remote Login to Server
Message-Id: <Xns956EB355A5514fredackcommcom@216.196.97.142>
"Matt Garrish" <matthew.garrish@sympatico.ca> wrote in
news:63L4d.27574$pA.1749387@news20.bellglobal.com:
>
> "Fred Goldberg" <ackcomm@JUNKcomcast.net> wrote in message
> news:Xns956DD566777E8fredackcommcom@216.196.97.142...
>> Novice - So no flames please.
>>
>> I have perl script that connects to our Win2000 Server which is
>> running MS SQL Server. My data base handle statement is:
>>
>> my $dbh = DBI->connect('DBI:ODBC:DB_Name', 'DB_Login', 'DB_PWD') or
>> die "Couldn't connect to database: " . DBI->errstr;
>>
>> The above works fine in the office from my networked PC. I would like
>> to be able to run this program from home via the Internet. I know my
>> server's IP address, user_login and user_password.
>> 1) How can I modify my $dbh to accomodate this?
>> 2) Do I need to configure "Data Sources (ODBC)" under my login on the
>> remote server so it points to "DB_Name"?
>>
>
> You need to configure a similarly named ODBC source on your home
> computer pointing to the IP of the server with the db. You shouldn't
> need to change the connection string at all.
>
> Matt
>
>
Matt,
Thanks for the reply. I tried to configure this server but it continually
fails test. With this IP address, I can log into the server using Remote
Desktop. I tried configuring ODBC using 3 different logins including
Administrator. All failed. I also noted that the ODBC configurator does not
send anything out to the net unless I preceed the IP address with a "//"
which I do not use in the office.
So, what is going on here. Is it possible to configue ODBC for a server
that exists remotely on the Internet as an IP address rather than being
part of a LAN?
Fred
------------------------------
Date: 24 Sep 2004 14:49:17 -0700
From: krakle@visto.com (krakle)
Subject: Re: Help with my brute force method
Message-Id: <237aaff8.0409241349.3af0a519@posting.google.com>
larryj@gsu.edu (Larry Felton Johnson) wrote in message news:<4ae7bf57.0409231037.7ecf1515@posting.google.com>...
> krakle@visto.com (krakle) wrote in message
> >
> > Do you leave your home door wide open when you enter your house?
>
> It depends on the weather, the time of year, whether I plan on being in
> the front room for the evening, and a number of other factors :-)
>
> You wanna elaborate, or should I continue with domestic habit flow?
>
> Larry
Your other posts are too long to interest me. What I meant was...
close the opened file when you are done.. :)
------------------------------
Date: Sat, 25 Sep 2004 07:10:54 +0800
From: Dan Jacobson <jidanni@jidanni.org>
Subject: matching devious non ascii spam strings
Message-Id: <87vfe3tg8x.fsf@jidanni.org>
To match the name of a famous spam drug for spamassassin, I use
/v[il1\xA0-\xFF]agra/i
as they now are using all the accented versions of "i".
I suppose I will have to do the same for the a's etc. too.
I have just used the entire range I see on "man iso_8859_1" and more,
rather than whittle it down. I don't suppose there are much better ways.
------------------------------
Date: Fri, 24 Sep 2004 23:16:00 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: matching devious non ascii spam strings
Message-Id: <WvednQ1DvPlsf8ncRVn-pA@comcast.com>
Dan Jacobson wrote:
> To match the name of a famous spam drug for spamassassin, I use
> /v[il1\xA0-\xFF]agra/i
> as they now are using all the accented versions of "i".
> I suppose I will have to do the same for the a's etc. too.
> I have just used the entire range I see on "man iso_8859_1" and more,
> rather than whittle it down. I don't suppose there are much better ways.
The Bayesian filters worry about that kind of crud automatically.
Let them do the work.
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
------------------------------
Date: 24 Sep 2004 13:24:32 -0700
From: ketema@gmail.com (Ketema)
Subject: perlXStut
Message-Id: <983b6750.0409241224.693c988a@posting.google.com>
I am attempting to go through the perlXStut and I can't complete the
make process. My system is WinXP. I have Visual Studio.Net 2003
installed, so I am using nmake, as also confirmed by perl -V:make. My
perl is Activestate v5.8.4.
My perl -V:libc is msvcrt.lib.
After having a buch of files missing I finally figured out to add
"c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\bin","c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include" and "c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\lib" in my perl inc path. The files I am trying to create is
right out of perlXStut: Mytest. The error I am getting is:
Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
link -out:blib\arch\auto\Mytest\Mytest.dll -dll -nologo
-nodefaultlib -d
ebug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86
Mytest.obj C:\Per
l\lib\CORE\perl58.lib oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.li
b comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uu
id.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib
odbccp32.lib msvcrt
.lib -def:Mytest.def
Creating library blib\arch\auto\Mytest\Mytest.lib and object
blib\arch\auto\M
ytest\Mytest.exp
LINK : fatal error LNK2023: bad dll or entry point 'msobj71.dll'
NMAKE : fatal error U1077: 'link' : return code '0x7e7'
Stop.
What can I do to solve this, or is there another way to create to
object file?(which is what my intepretation of the failure is"
Thanks
Ketema
------------------------------
Date: Fri, 24 Sep 2004 18:54:56 GMT
From: vali <vticau@excite.com>
Subject: Re: Permagick Fonts
Message-Id: <44_4d.11653$tF.2410@news.cpqcorp.net>
Julia De Silva wrote:
>(O'Reilly) but where are the fonts on a UNIX box, and how do I find them?
>
>
>
`man xlsfonts`
------------------------------
Date: 24 Sep 2004 20:08:33 -0700
From: simon.low@pearson.com (Simon L)
Subject: Re: Problem printing array content with CGI
Message-Id: <c75aaf9b.0409241908.7b997570@posting.google.com>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<2rj362F19gourU1@uni-berlin.de>...
> Shawn Corey wrote:
> > If a CGI works from a command line but not when called by a web
> > server then 95% of the time it's a problem with permissions.
>
> Relative paths is a rather common cause as well.
>
> > Check _all_ files including the data files.
>
> And ensure that they are called with full paths.
Thanks for your responses. I used absolute path. I subsequently
wrote the code below, this time, it involves no files but only
a pipe declared before a fork, and still, it works at command line
but display nothing on the browser. I am starting to think
maybe I missed something very basic. Any idea?
pipe(FROM_CHILD, TO_PARENT);
$pid = fork;
my $data=undef;
if($pid) { # parent
close(TO_PARENT);
$data = <FROM_CHILD>;
print header('text/plain');
print $data;
my $id = wait();
print "id=$id\n";
} else { #child
close(FROM_CHILD);
print TO_PARENT "Hello, call from child\n";
exit(0);
}
Thanks,
SL
------------------------------
Date: Fri, 24 Sep 2004 21:04:28 -0700
From: Steve May <junk@blackwater-pacific.com>
Subject: Re: Problem printing array content with CGI
Message-Id: <10l9rfrjbi1ln70@corp.supernews.com>
Simon L wrote:
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<2rj362F19gourU1@uni-berlin.de>...
>
>>Shawn Corey wrote:
>>
>>>If a CGI works from a command line but not when called by a web
>>>server then 95% of the time it's a problem with permissions.
>>
>>Relative paths is a rather common cause as well.
>>
>>
>>>Check _all_ files including the data files.
>>
>>And ensure that they are called with full paths.
>
>
> Thanks for your responses. I used absolute path. I subsequently
> wrote the code below, this time, it involves no files but only
> a pipe declared before a fork, and still, it works at command line
> but display nothing on the browser. I am starting to think
> maybe I missed something very basic. Any idea?
This really sounds more like a server issue.
I believe I'd be looking at my error log for clues....
\s
------------------------------
Date: Fri, 24 Sep 2004 19:48:53 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: what module could easiely load all files to a @array from a specified folder(and subfolders)?
Message-Id: <neu8l0drlu3nnlomh6vqbgki2im3jkmn9q@4ax.com>
Alont wrote:
>in the beginning I read the help file of File::find ,but can't find a
>way to easiely solve my problem
use File::Find;
my @ls;
find sub {
push @ls, $File::Find::name if -f;
}, "/dir/to/check", "/another/dir/to/check";
# now, look in @ls...
--
Bart.
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 7175
***************************************