[9887] in Perl-Users-Digest
Perl-Users Digest, Issue: 3480 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 19 04:07:35 1998
Date: Wed, 19 Aug 98 01:00:29 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 19 Aug 1998 Volume: 8 Number: 3480
Today's topics:
2 quick questions <mivl@inquo.net>
Re: Another invocation problem (_does_ seem to be a per <mgregory@asc.sps.mot.com>
Re: Dynamically creating graph images <sidi@angband.org>
Re: Easy one for you. (Gabor)
Re: filehandle in CGI.pm (wings)
Re: here's an implementation of diff in perl (Abigail)
Re: here's an implementation of diff in perl <scribble@pobox.com>
Re: here's an implementation of diff in perl <scribble@pobox.com>
Re: Inplace Editing (Tad McClellan)
Re: Looking for hybrid database/shopping cart program <cart@dansie.net>
MS-Access and Perl <marcel.ryser@rac.admin.ch>
Re: mv, move, or some way to move files in perl (Gabor)
Re: pangrams in Perl --- randomized Robisonizing (Hauke Reddmann)
Re: PLEASE - SOMEONE (Tad McClellan)
Posting JPEG-images from CGI-script... <w3master@infosys.ru>
Re: readdir FILEHANDLE, $dir (Tad McClellan)
Reading from files <jkghins@highpoint.net>
Re: request for comments... (Craig Berry)
Re: Sybperl vs web.sql <jwb79@mail.idt.net>
Re: Which database to use with Perl for Win32 <antoy@cs.pdx.edu>
Re: Why dont people read the FAQs (Tad McClellan)
Re: Why dont people read the FAQs (Tad McClellan)
Re: Why dont people read the FAQs (Craig Berry)
Win32::RasAdmin -- Setting NT RAS permissions with PERL <kingm@vmicro.com>
Re: wrapping text <qdtcall@esb.ericsson.se>
write stripping chars (Orjan Stromberg)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 18 Aug 1998 23:06:23 -0600
From: "Kris Davey" <mivl@inquo.net>
Subject: 2 quick questions
Message-Id: <6rdmep$qq$1@quartz.inquo.net>
1. I think I remeber seeing something a while back about compiling perl
scripts to an exe. I can't remeber if was a p3exe.bat or an actual compiler.
I would like to create scripts that I can run on workstations that don't
have Perl. (These workstations are on an isolated network with no ISAPI web
server).
2. What would be the best way, if any to create a script that connects from
the server to the workstation and runs code on the workstation. i.e. copies
new executables down, kills processes, run uninstall, reruns install,
restarts processes. I was looking at sockets but i'm not sure that would
work maybe it's a module that I overlooked. This is between an NT Server and
NT Workstations.
Any help would be appreciated, and for the record I read through the docs
and was unable to get the answer I was looking for.
Kris Davey
------------------------------
Date: 19 Aug 1998 09:58:41 +0930
From: Martin Gregory <mgregory@asc.sps.mot.com>
Subject: Re: Another invocation problem (_does_ seem to be a perl problem!)
Message-Id: <r81zqd95mu.fsf@asc.sps.mot.com>
qpf@pentagon.io.com (Quentin Fennessy) writes:
> In article <r8iujrnow5.fsf@asc.sps.mot.com>,
> Martin Gregory <mgregory@asc.sps.mot.com> wrote:
> > [snip]
> >The first one executes as I would expect: it echoes -w -S and the invocation.
> >
> >The second one says:
> > -w: bad option(s)
> >
> >Why is this so? It appears that the fact that perl is on the
> >invocation line causes something strange to happen?
>
> Martin, your second script is not being run by your perl interpreter.
> From perlrun(1):
[snip]
> If the #! line does not contain the word "perl", the program named after
> the #! is executed instead of the Perl interpreter.
It shouldn't matter, should it?. The script is valid sh syntax, which
asks for perl to be execed.
Actually, how is it that this doesn't go round in circles for ever?
(Since perl should see it and pass it back to sh ad infinitum?)
Now my head is really spinning.....
Thanks for all the responses so far!
Martin.
------------------------------
Date: 19 Aug 1998 06:42:21 GMT
From: Chris Sidi <sidi@angband.org>
Subject: Re: Dynamically creating graph images
Message-Id: <6rds4d$9ht$1@news-int.gatech.edu>
In comp.lang.perl.misc Danny Goodman <dannyg@dannyg.com> wrote:
>> I need to dynamically build a bar graph with this data.
> The bottom line technique is to create a one-pixel image of your desired
> color. Then use JavaScript to determine the size of each bar, and
> document.write() the <IMG> tags to set the HEIGHT and WIDTH attributes as the
> page loads. For all browsers except IE4, you must define these attributes as
> the page loads, since the image won't be resizable thereafter.
Check out http://www.botany.hawaii.edu/tables/gal_bar.htm for some simple
graphs based on stretching a one-pixel gif. Javascript and/or perl could
make the WIDTH and HEIGHT values dynamic.
For graphs where you have to generate a gif, check out GD and gifgraph
(and someone said gnuplot).
Also, if you want a one-pixel gif of a certain color, feel free to *copy*
(not link to) a gif from my CGI script that uses GD. The following both
generate pure green pixel gifs.
http://angband.org/~sidi/cgi/one_pixel.gif?0_255_0
http://angband.org/~sidi/cgi/one_pixel.gif?00FF00
Source for CGI script at http://angband.org/~sidi/cgi-src/one_pixel.gif.txt
-Sidi
------------------------------
Date: 19 Aug 1998 03:14:12 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: Easy one for you.
Message-Id: <slrn6tkgt5.3oq.gabor@guava.vmunix.com>
In comp.lang.perl.misc, Kelly Hirano <hirano@Xenon.Stanford.EDU> wrote :
# In article <Pine.GSO.3.96.980817200902.291D-100000@expert.cc.purdue.edu>,
# Jonathan M. Hartman <cajun@cyberspace.org> wrote:
# >OK. I'll admit it. I'm a newbie at this. I am trying to parse out a string
# >that has pipes seperating the values. I'd like to just load them into an
# >array, but I can't figure out the proper syntax for the split function...
# >The string I am trying to parse looks like the following:
# >
# >2|WARNINGS|WARNINGS|1600034|sunthu4|arbctprd
# >
# >How can I do this? I have several of these that I am reading from a file,
# >and want to use a foreach loop to deal with each of them in turn.
# >
#
# geez, there was just another thread about how to split a comma-delimited
# string...
#
# man perl
# perldoc -f split
#
# my $line = qq!2|WARNINGS|WARNINGS|1600034|sunthu4|arbctprd!;
# my @array = split(/|/, $line);
Too bad that a | is a special character in a regex. ;) Maybe you should
take your own advice and 'man perl'.
------------------------------
Date: 19 Aug 1998 04:51:07 GMT
From: scip7075@leonis.nus.sg (wings)
Subject: Re: filehandle in CGI.pm
Message-Id: <6rdljr$lf8$1@nuscc.nus.edu.sg>
thx for all the replies. i havent tested your options since i was in a
hurry to make the program work these days. however, i'd like to share how
i solve that problem in a different way.
i managed to generate the multi-form data with CGI itself instead of a
separate HTML file. then it works!
will test your ways today. thx again.
--
wings
--------
World is a book, those dont travel read only one page.
------------------------------
Date: 19 Aug 1998 04:43:59 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: here's an implementation of diff in perl
Message-Id: <6rdl6f$nvh$1@client3.news.psi.net>
Lloyd Zusman (ljz@asfast.com) wrote on MDCCCXIV September MCMXCIII in
<URL: news:slrn6tkhqo.25o.ljz@sunspot.tiac.net>:
++
++ In the case I mention in the paragraph you quoted, the probability is
++ high that the determination of matching/non-matching would occur after
++ the first character of the line is tested, irrespective of the
++ line-length value N. This is sublinear w/r/t N, so I suppose this
++ would be still be considered O(N) by the definition you supplied ...
++ right?
You mean that after checking the first character, only N - 1
comparisons are needed? That still takes time proportial to N.
Even if you have checked 99.99% of the characters, checking the final
0.01% will take Omega (N) worst case. When talking big-Oh and friends,
sublinear means o (N) (little-oh). And having to check 0.01% of N
characters is not o (N).
Abigail
--
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'
------------------------------
Date: 19 Aug 1998 02:02:05 -0500
From: Tushar Samant <scribble@pobox.com>
Subject: Re: here's an implementation of diff in perl
Message-Id: <6rdt9d$ec8@tekka.wwa.com>
abigail@fnx.com writes:
>Tushar Samant (scribble@pobox.com) wrote on MDCCCXII September MCMXCIII
>in <URL: news:6ra7jn$65e@tekka.wwa.com>:
>
>++ True. Perhaps the desired "quality" setting might come from some
>++ notion of approximate equality. For instance, two long strings
>++ are equal if they are less than length 100 and equal, else we
>++ pessimistically declare them unequal... This makes the
>++ "comparison" constant time...
>
>Yes, but the discussion about role lenght plays in comparison stems
>from idea to compary k lines at once. So, taking an arbitrary limit
>of 100 quickly degrades into uncomfortable short lines.
It might have stemmed from it, but I mentioned it merely as another
way to degrade line-by-line diff. The idea of course being to allow
diff to occasionally report two identical lines as different -- in
fact precisely when someone has introduced longer-than-80 lines.
May or may not speed things up in Perl...
>++ Armchair idea #2: don't redefine what your "lines" are, but
>++ split up the files into chunks and concatenate optimal diffs on
>++ corresponding pairs of chunks.
>
>But that isn't helping much, as there are many places where the
>chunks can start for optimal matching.
Certainly, but there are two vague strategies to determine where
to restart: one is implicit in the fact that people apply diffs
to directories instead of tars of directories -- which is in a
sense "intelligent" splitting, but might be approximable by some
kind of pattern matching (like looking for the start of a sub).
Another way may be to watch how big your (implicit or explicit)
memo table has grown during your dynamic programming, and "flush"
it whenever it gets too big. I plan to see if this yields any-
thing whatsoever...
------------------------------
Date: 19 Aug 1998 02:11:54 -0500
From: Tushar Samant <scribble@pobox.com>
Subject: Re: here's an implementation of diff in perl
Message-Id: <6rdtrq$s9l@tekka.wwa.com>
gbacon@cs.uah.edu writes:
> mjtg@cus.cam.ac.uk (M.J.T. Guy) writes:
>: Greg Bacon <gbacon@cs.uah.edu> wrote:
>
>: >O(n + n lg n) is the same as O(n lg n).
>:
>: What's that got to do with Abigail's (correct) statement?
>
>It takes O(n) comparisons to check whether a set is already sorted.
>This is a simple approach, but most modern implementations of quicksort
>do something to avoid quicksort's O(n**2) worst case.
Sorry, the fact that you are "wrong" follows from the "fact" that
Big-O should only be used to describe worst case. Average case is
alas forbidden from aspiring to the full rounded medal of "O".
To say nothing of the fact that saying something is O(n*n) conveys
some (metaphysical) information even AFTER you have established
that it is O(n)...
------------------------------
Date: Tue, 18 Aug 1998 23:36:52 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Inplace Editing
Message-Id: <4pkdr6.bn7.ln@metronet.com>
Ashley Rosilier (ashley@austin.ibm.com) wrote:
: Ok, I'm having a heck of a time finding the documentation
: on how to do inplace editing of a file.
: I left my good : book at home :-/
The good book is the one that came with your perl distribution.
Do you have perl?
: can anyone point me to some doucmentation (other than the
: $^I predefined variable!) or better yet, an example?
The 'perlrun' manpage describes command line switches for Perl.
You want the -i switch.
Has two examples. One command line, one as a script file.
Are those unsatisfactory for your purposes?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 18 Aug 1998 21:41:43 -0700
From: Craig <cart@dansie.net>
To: Gary Nielson <gnielson@charlotte.infi.net>
Subject: Re: Looking for hybrid database/shopping cart program
Message-Id: <35DA5787.DC32DFC0@dansie.net>
Gary,
See if the Dansie Shopping Cart can help. There's an online demo.
http://www.dansie.net/demo.html
Gary Nielson wrote:
> Hi,
>
> I want to be able to put online information on about 100 products, but
> without pricing information. The products fall into 4 groupings, and I
> would like the ability for a user to view products and be able to enter
> the quantity they are interested in and then after browsing all 4
> categories, be able to click on a "Submit" button and have the
> information on each item selected listed in an email that they would
> send me for pricing information. In essence, this is a shopping cart
> program without the need for pricing, shipping and handling, credit card
> info, etc. Does anyone know of such a program or something similar that
> I could adapt to my needs?
>
> Any help appreciated. Please email reply as well.
>
> Gary
> Charlotte NC
--
Regards,
Craig Dansie
Dansie Shopping Cart
http://www.dansie.net
cart@dansie.net
------------------------------
Date: Wed, 19 Aug 1998 08:06:44 +0200
From: Marcel Ryser <marcel.ryser@rac.admin.ch>
Subject: MS-Access and Perl
Message-Id: <35DA6B74.6A816B0D@rac.admin.ch>
I am developing perl program under Linux. I try to access Access
database.The DB could be on the same Linux workstation (I could use
samba!), or on a NT server. What is the best solution?
I have DBD-ODBC-0.20 , iodbc and DBI installed.
If anyone knows if (and how) this is possible, please post it.
-----------------------------
Marcel Ryser
Swiss Federal Research Station for Plant Production
email : marcel.ryser@rac.admin.ch
------------------------------
------------------------------
Date: 19 Aug 1998 03:09:29 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: mv, move, or some way to move files in perl
Message-Id: <slrn6tkgk9.3oq.gabor@guava.vmunix.com>
In comp.lang.perl.misc, Thomas Frederick O'Connell <tfo@telalink.net> wrote :
# is there a good way other than
#
# system( "mv ..." );
#
# to move directory trees across filesystems in perl? i could have sworn
To move a directory tree across file systems you must copy the directory
tree. You cannot just rename the directory. That's how mv works as
well. It does a rename if the source and destination reside on the same
file system, but does a recursive copy if the don't.
# that there used to be a mv function in File::Copy, but when i went looking
# today, it wasn't there. but my memory of looking for something similar is
# about a year old, so i could be wrong. i would also rather avoid
#
# copy( ... );
# unlink( ... );
#
# why isn't there a File::Move module, incidentally?
If the source and destination are on the same file system, you can just
use 'rename'. Otherwise, you can use File::NCopy to recursively copy
the directory and File::Remove to recursively remove the source.
------------------------------
Date: 19 Aug 1998 07:48:51 GMT
From: fc3a501@AMRISC01.math.uni-hamburg.de (Hauke Reddmann)
Subject: Re: pangrams in Perl --- randomized Robisonizing
Message-Id: <6re013$auh$1@rzsun02.rrz.uni-hamburg.de>
Tomoyuki Tanaka (ez074520@dilbert.ucdavis.edu) wrote:
:
: i wrote this mainly in the hope that others will modify it to
: find self-doc pangrams (Sallowsgrams) in other languages
: (i've never seen one in German).
:
That's because I'm too lazy :-)
(Rewrite the program to FORTRAN and I'll give it a try :-))
ObPangramLight:
Dieser Satz hat achtunddreissig Buchstaben.
--
Hauke Reddmann <:-EX8 BRANDNEW,IMPROVED SIG!
Send all spam to buggeth@thee.off
Send all personal e-mail to fc3a501@math.uni-hamburg.de
Send all e-mail for our chemistry workgroup to fc3a501@uni-hamburg.de
------------------------------
Date: Tue, 18 Aug 1998 22:58:07 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: PLEASE - SOMEONE
Message-Id: <fgidr6.ci7.ln@metronet.com>
Alfredo Galebe (galebe@hotmail.com) wrote:
: Subject: PLEASE - SOMEONE
PLEASE SUBJECT IN YOUR Subject:
PLEASE DON'T SHOUT AT US!
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 19 Aug 98 05:17:09 GMT
From: "Administrator" <w3master@infosys.ru>
Subject: Posting JPEG-images from CGI-script...
Message-Id: <01bdcb38$f6f59a60$e16c54c2@serverg1>
Hello everyone!!!
Could you please help me to find out how to return to the client's machine
a JPEG- or GIF- images from CGI-script, written on PERL.
I heard that an image could be sent form a server with the help of and HTTP
headers i.e.: "Content-Type: image/x-xbitmap/n/n". But it appeares to me
that this commands works only w/ XBM images.
I also heard that before one wants to send and image to a client, he needs
to create in the machine/server memory a Binary ARRAY, and then transmit
it line by line. How this array could be created in Perl? Is there any
other way to implementation of this task?
If anything appeares unclear in my question, please do not hesitate to ask
me for an explanation. I'm a Russian guy and I'm a web master of a small
Internet provider in a small Russian town Nakhodka. I want to create a
web-page visitors counter. If you have any cool examples, and you don't
mind to share them w/ me, please let me know. My return e-mail address is:
w3master@infosys.ru
Sincerely
Roman Petrov (Mr.)
------------------------------
Date: Tue, 18 Aug 1998 22:56:36 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: readdir FILEHANDLE, $dir
Message-Id: <kdidr6.ci7.ln@metronet.com>
Ryan Snowden (ryan@steelplan.com.au) wrote:
: opendir CONTENTS, $upload_dir;
[snip]
: What am I doing wrong?
Not checking the return value, for one.
opendir(CONTENTS, $upload_dir) || die "could not open '$upload_dir' $!";
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 19 Aug 1998 00:07:19 -0400
From: jkghins <jkghins@highpoint.net>
Subject: Reading from files
Message-Id: <35DA4F77.ABF41A63@highpoint.net>
I'm in my very early stages of PERL and have come across a little
stump. I'm writing to a file on the internet that stores some info
about a product. I want to store all of the product info in it's own
specific file but need to know how to tell the computer that each
section in the file is a little different and how to pull data from each
section within the file. Somehow put labels or something in the file.
The things I've tried so far haven't worked. Any help would be great.
Thanks a lot!
------------------------------
Date: 19 Aug 1998 06:17:28 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: request for comments...
Message-Id: <6rdqlo$vi$3@marina.cinenet.net>
Ronald J Kimball (rjk@coos.dartmouth.edu) wrote:
: Bill Jones, FCCJ Webmaster <webmaster@fccjmail.fccj.cc.fl.us> wrote:
:
: > next unless chr($first) =~ /^-?[a-zA-Z0-9]+$/;
: > next unless chr($second) =~ /^-?[a-zA-Z0-9]+$/;
:
: What's up with these regex matches? chr() always returns a single
: character.
:
: next unless chr($first) =~ /[a-zA-Z0-9]/;
Which, if appropriate, can be written more concisely and locale-
indpendently as
next unless chr($first) =~ /[^\W_]/;
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: 19 Aug 1998 06:47:24 GMT
From: "Jim Babbington" <jwb79@mail.idt.net>
Subject: Re: Sybperl vs web.sql
Message-Id: <01bdcb3d$5c1fe680$6488fdc7@dixon>
: I need to access a Sybase database from within perl. I know that sybperl is
: probably the best solution, but when I asked our UNIX guy/webmaster here to
: install it, he said he wouldn't because of a support risk (no guaranteed
: support, not supported by Sybase).
Sybase has told me that they _do_ support sybperl, and will take perl questions
in regards to perl accessing their product. I would contact them directly.
I hope this helps.
Jim
------------------------------
Date: Tue, 18 Aug 1998 21:22:22 -0700
From: Sergio Antoy <antoy@cs.pdx.edu>
Subject: Re: Which database to use with Perl for Win32
Message-Id: <35DA52FE.5BC53EED@cs.pdx.edu>
Sucheta Khot wrote:
>
> Could anybody please advice me on which database should I use and how
> should I use with Perl for Win32.
>
> Thanks,
> Sucheta
I have been using MSAccess. Look for DBI and DBD::ODBC at
http://www.hermetica.com/technologia/DBI/index.html.
Sergio
------------------------------
Date: Tue, 18 Aug 1998 23:20:16 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Why dont people read the FAQs
Message-Id: <0qjdr6.pk7.ln@metronet.com>
Alois Steindl (asteindl@mch2pc21.tuwien.ac.at) wrote:
: Jonathan Feinberg <jdf@pobox.com> writes:
: > Remember that the replies to a given post may not have propagated when
: > someone posts their own reply. How can you know that 5 other people
: > have already posted replies?
: I don't think it's necessary at all to post such replies. Maybe the
: traffic in this newsgroup could be reduced considerably, if answers to
: FAQs were send by email:
Maybe the traffic in this newsgroup could be reduced considerably,
if questions that have already been answered were not asked
yet again ;-)
But how to get reduced FAQ postings?
: If a FAQ generates 5 responses with pointers
: to the FAQ, the traffic caused by these answers is maybe much larger
^^^^^
: than by the question itself.
No "maybe" about it. The "see the FAQs" most often do exceed
the original question.
But maybe some conscientious newbie will see all of those
repeated references to the docs, and start using them,
thereby avoiding starting yet another such thread.
And getting the answer faster.
And getting an answer that has been validated, rather than
taking a chance on one person's say so.
And impressing the boss with their productivity.
And getting raises and promotions.
And wealth and fame.
And... ;-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 18 Aug 1998 23:21:42 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Why dont people read the FAQs
Message-Id: <msjdr6.pk7.ln@metronet.com>
b_redeker@hotmail.com wrote:
: In article <ant171908b49Rr9i@waveney.demon.co.uk>,
: Richard Proctor <Richard@waveney.demon.co.uk> wrote:
: > Why do we get so many questions here that are in the FAQ?
: [snipped holy FAQ halleluja]
: >
: The FAQ's are by hackers for hackers,
: and while great for experienced Perl-writers and UNIX/Linux-adepts,
: others (newbies) may find the FAQ at times confusing
Then you have found a bug in the docs.
Please report it with the 'perlbug' program so it can be fixed.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 19 Aug 1998 06:10:00 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Why dont people read the FAQs
Message-Id: <6rdq7o$vi$2@marina.cinenet.net>
Larry Rosler (lr@hpl.hp.com) wrote:
: [Posted to comp.lang.perl.misc and a copy mailed.]
:
: In article <35db0173.1744952@newshost.pcug.org.au> on Tue, 18 Aug 1998
: 23:13:38 GMT, Owen Cook <rcook@pcug.org.au> says...
: ...
: > unless((length($CCNumber) == 16) && ($CCNumber=~ /\d{16}/))
:
: unless ($CCNumber =~ /^\d{16}$/)
If, as was discussed under a different topic a couple of weeks ago, you
either know $CCNumber has no trailing newline, or don't mind one if it's
there.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Tue, 18 Aug 1998 21:50:50 -0700
From: "Michael A. King" <kingm@vmicro.com>
Subject: Win32::RasAdmin -- Setting NT RAS permissions with PERL!
Message-Id: <35da59be.0@news.vmicro.com>
I am trying to grant dialin privileges to existing NT user accounts using
Dave Roth's RasAdmin module which appears to be a tool to call Microsoft's
RASSAPI.DLL. I need to be able to toggle the RASPRIV_DialinPrivilege flag,
but
cannot get RasAdmin to do this.
I am calling it like this:
Win32::RasAdmin::UserSetInfo($Server,$UserName, RASPRIV_DialinPrivilege,
0x8)
I am assuming that this is proper syntax -- no errors are generated, but the
code isn't returning a successful result. I would imagine if I am doing
anything wrong it is with the flag and value (RASPRIV_DialinPrivilege and
0x8) . . . . Does this need to be dealt with bitwise? It appears from the C
APIs that I have seen that there is a byte value that is set to toggle
certain RAS flags, and that the 00001000 is the way to enable RAS Dialin
(010 octal or 0x8 hex), correct?
Anyhow, any help / insight with this pesky little problem would be
appreciated!
Sincerely,
--Michael King
--Director, Technical Operations
--VM Online / VM2000
--Temecula, CA
------------------------------
Date: 19 Aug 1998 09:32:43 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: wrapping text
Message-Id: <isr9ydmnok.fsf@godzilla.kiere.ericsson.se>
joyness@leland.Stanford.EDU (Joy Mei Chen) writes:
> I have a program that stores text as one long string, but UNIX chokes up
> with strings longer than 255 characters.
No, it doesn't. If you want help, describe the problem instead of your
wild guesses about the cause of the problem.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: 19 Aug 1998 07:16:25 GMT
From: connor@tekla.ing.umu.se (Orjan Stromberg)
Subject: write stripping chars
Message-Id: <slrn6tkuub.f92.connor@tekla.ing.umu.se>
Greetings Perl-gurus,
I've been reading and trying and reading and trying, and am now close
to tearing my hair out. I'm using a very simple format, and am trying
to print some variables with it. The problem seems to be that the
variables contain ANSI sequences, in particular, colours. The literal
ESC seems to be stripped off by write. Is this normal behaviour? Is
there a way to get around it, somehow?
Actually, doing some small tests, it seems to behave even more
strangely. Sometimes characters before the ESC are removed, sometimes
a space is inserted instead, and so on. For example, this short test:
#!/usr/bin/perl
format STDOUT =
@<<<<<<<<
$test
.
$test = "<ESC>[1;37mTest<ESC>[0m\n";
write;
(with the ESCs being 'real', of course), gives the output:
[1;37mTe
I'm stumped. :) Here I was, thinking I knew perl on a decent level at
least. *blush*
Thanks in advance for any help,
/Orjan
--
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I want to die in sleep like my grandfather, not screaming and yelling like
the passengers in his car.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3480
**************************************