Re: use lib

2007-04-02 Thread Bill Jones

On 4/2/07, Nigel Peck [EMAIL PROTECTED] wrote:


My question is, is this the best way to go about having modules in
development?



Yes and no.

Read more about this at:
http://www.perlmonks.org/index.pl?node_id=238691

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Wanted: perl script to download iso files from web page

2007-03-14 Thread Bill Jones

On 3/14/07, siegfried [EMAIL PROTECTED] wrote:

I'm looking at http://cpan.org/scripts/Networking/index.html and I don't see
any obvious scripts that would meet my need. I'm looking for a script that
would scrape a web page for all the downloadable iso files and download
them.




I would suggest you look toward WWW::Mechanize
http://search.cpan.org/search?query=WWW::Mechanizemode=all

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Control Characters

2007-03-13 Thread Bill Jones

On 3/13/07, Rob Dixon [EMAIL PROTECTED] wrote:


Unless I'm in a different parallel universe this doesn't make sense at all!

What tests have you done Bill?

How is ^@ (a null or zero byte) equal to \n?

How is control-J two bytes? I thought it was pretty much defined as the
character consisting of the least-significant five bits of the value for
the letter 'J', which is ten.

Under my C, internal strings are terminated with a null byte character \0
or \c@, and only garbage follows that null terminator.



Under VIM and using od -c  I see two bytes for the Control-J: \0 and \n

000005000
002

000   \0  \n
002

In answer to your question, for example under VIM, the ^@ the other
poster is seeing is actually \n (which is what the OP wants) -- but I
am in my own Universe  =)

So, when I hit  ^V^J   VIM displays ^@

Cheers/Sx  =)
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Control Characters

2007-03-13 Thread Bill Jones

On 3/13/07, Bill Jones [EMAIL PROTECTED] wrote:


000005000
002

000   \0  \n
002



Erm, make that:

od -b xxx is -

000   000 012
002


--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Output Order?

2007-03-01 Thread Bill Jones

On 3/1/07, David Moreno Garza [EMAIL PROTECTED] wrote:

What's the proper way to handle buffering? I mean, to prevent it.


Sometimes you just want to output immediately; however as Tom mentioned
'cat' doesn't output until the buffer is closed; for example -

$|++; # Setting this has no effect on 'cat'
open(o,|cat); print o Not first because of buffering.\n;
# close(o); # Uncomment this line for 'cat' to become closed 1st...

print o 0 x 9; # Does cat get printed now? Buffer became full.
#sleep 1; # Yes, buffer is full; LINE 2 gets printed in the middle.
# But probably not a good thing ... LINE 2 appears out of context ...

$_ = LINE 2: gets printed first?\n\n; print;
sleep 1;

__END__
cat: Buffer gets closed here because all open buffers
are closed when the program finishes...

Note: In the 'buffer full' example, use -

 perl oo.pl | less

 Be careful to watch for the output of LINE 2;
 with 100k characters you might miss LINE 2 -
 it gets printed immediately after the 'buffer flush' and
before the 'end of the data stream' ...


The bottom-line?  Be careful of your I/O -- things that seem to make
program (logical) order sense may not produce expected results...


One possible answer to your question -

# A long winded approach might use
# (modified from FAQ 8) -

use IPC::Open3;

$_ = I am the Alpha and the Omega (UT99 Player Xan)\n;
open(o, cat $_);
print;

print H?\n;

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Output Order?

2007-03-01 Thread Bill Jones

Gr   check syntax check syntax ;  lol ...

On 3/1/07, Bill Jones [EMAIL PROTECTED] wrote:


# A long winded approach might use
# (modified from FAQ 8) -

use IPC::Open3;

$_ = I am the Alpha and the Omega (UT99 Player Xan)\n;
open(o, cat $_);
print;

print H?\n;


That code will 'perl -c' checked out but still doesn't work because
it's not the
same example as before -- this is the same as original example


# A long winded approach might use
# (modified from FAQ 8) -

$_ = Buffer testing\n;
open(o, |cat);
print o $_;
# Buffer still in effect until close(), out of scope, or end of program...

Sorry!   (I suppose I should program more and play UT99 less  :-)
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Output Order?

2007-02-28 Thread Bill Jones

# Out of curiousity -- why does line 2 get printed first?
#
open(o,|cat);print o I think I am 1st? ^L^M;
$_ = LINE 2: Jvtu bopuifs Pfsm ibdlfs ...; y/a-z/za-y/; print

__END__
A Note:  There is an embedded ^L^M in line 1.
Output:

LINE 2: Just another Perl hacker ...I think I am 1st?


--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Is Perlmonks.org down? Or is it me?

2007-02-14 Thread Bill Jones

On 2/14/07, Rob Coops [EMAIL PROTECTED] wrote:

It might be a little slow as the few people that use perl seem to be able to
need a lot of help on how t use it causing a huge load on the servers :-)



Ouch!   lol,  I haven't been on there in months  =)

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




XUL::Node Question

2007-02-07 Thread Bill Jones

XUL::Node Question

Has anyone gotten a working example or basic application operational using
http://search.cpan.org/~eilara/XUL-Node-0.05/lib/XUL/Node.pm

The docs state I should be able to access
http://localhost:8077/start.xul?SplitterExample#1

But I can't seem to get any example to work -- I am using CygWin.

Any ideas would be welcome  :-)
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Perl Soap::Lite Help

2007-01-26 Thread Bill Jones

On 1/26/07, DiGregorio, Dave [EMAIL PROTECTED] wrote:

I am using soap from a client to talk to a server.  However on the
server side the java requires a type vector.  Does anyone know how to
use perl soap to create a data type vector?  I have so far been
unsuccessful finding any information on the web to do this.



http://www-128.ibm.com/developerworks/webservices/library/ws-soapmap1/

???
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Perl SSH

2007-01-24 Thread Bill Jones

On 1/24/07, Dukelow, Don [EMAIL PROTECTED] wrote:

by ssh.  Can someone regimen a Perl ssh module that works with
Net::Telnet?  I see there are several out there.



I am partial to this one:
http://search.cpan.org/~dbrobins/Net-SSH-Perl-1.30/

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Sending mail

2007-01-24 Thread Bill Jones

On 1/24/07, M. Lewis [EMAIL PROTECTED] wrote:


I've used MIME::Lite for the mail tasks I've had up till now and it has
worked very well. Now I need to send mail via a different port than port
25, say port 587. As far as I can tell, MIME::Lite does not have this
capability.

Can someone point me to a different mailer that does have this capability?



Maybe you can integrate this:
http://search.cpan.org/src/GMPASSOS/Mail-SendEasy-1.2/lib/Mail/SendEasy/SMTP.pm

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: How to customize Perl installation

2007-01-24 Thread Bill Jones

On 1/23/07, Jeff Peng [EMAIL PROTECTED] wrote:

 I'm not experienced with Red Hat, but I'd bet it
 already contains Perl
 core and CGI.pm.


Sorry,I mean I only need Perl core and CGI.pm to be
installed on my host,other modules are excluded.




Does this command give a LOT of output?

perl  -V

???

So, still, when you speak of Perl Core you are still talking about
many needed modules.  Additionally, when you speak of CGI.pm there are
still other modules which make sense.

What are you trying to accomplish?
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: putting ; as a replacement in the substitution.

2007-01-20 Thread Bill Jones

On 1/20/07, Michael Alipio [EMAIL PROTECTED] wrote:

my $string = 'vd=root,status=';
'vd=root;status='


$string =~ s[\,][\;]g;
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: How can I list down all builtin functions?(Re: Read a text file starting from the bottom)

2007-01-15 Thread Bill Jones

On 1/15/07, Michael Alipio [EMAIL PROTECTED] wrote:

Hi,

Is there a way to list down all builtin functions so that I may know what to 
perldoc -f?

Thanks.



Here is an example (from Apache2Triad on Windows.)

#!C:/apache2triad/perl/bin/perl.exe

print Content-type:  text/html\n\n;

#
# general info
#

print HTML;
 htmllink rel=stylesheet href=style.css
 h2 align=centergeneral info/h2
 p
 table class=table border=0 cellpadding=4 cellspacing=1 width=100%
tr
td width=35% class=tddbperl version:/b/td
td width=65% class=tdl$]/td
/tr
tr
td class=tddbperl compiled on:/b/td
td class=tdl$^O/td
/tr
tr
td class=tddbperl executable:/b/td
td class=tdl$^X/td
/tr
tr
td class=tddblocation of perl:/b/td
td class=tdl
HTML

$per = $^X ;
$per =~ s/perl.exe|PERL.EXE//;
@perlloc = ($per);
foreach $loc(@perlloc){
   print $locbr\n;
}

print HTML;
 /td/trtrtd class=tdd binclude paths:/b/tdtd class=tdl
HTML

foreach $item(@INC){
   if ($item ne .){
   print $item br\n;
   }
}

print HTML;
 /td/tr/table
HTML

#
# environment variables
#

print HTML;
   h2 align=centerenvironment variables/h2table class=table
border=0 cellpadding=4 cellspacing=1 width=100%
   trtd class=tdark bServer Variable/b/tdtd class=tdg

bValue/b/td/tr

HTML

foreach $fieldname(keys %ENV){
   print trtd width=35% class=tddfont
size=-1$fieldnamefont/td\n;
   print td width=65% class=tdlfont
size=-1$ENV{$fieldname}nbsp;font/td/tr\n;
}

print HTML;
 /table
HTML

#
# perl modules
#

use File::Find;

sub count {
   return $found{$a}[1] cmp $found{$b}[1];
}

sub ModuleScanner {
   if ($File::Find::name =~ /\.pm$/){
   open(FILE,$File::Find::name) || return;
   while(FILE){
  if (/^ *package +(\S+);/){
  push (@modules, $1);
  last;
  }
   }
   }
}

find(\ModuleScanner,@INC);
foreach $line(@modules){
   $match = lc($line);
   if ($found{$line}[0] 0){
  $found{$line} = [$found{$line}[0]+1,$match]
   }else{
  $found{$line} = [1,$match];
   }
}
@modules = sort count keys(%found);

print HTML;
 h2 align=centerperl modules/h2table class=table border=0
cellpadding=4 cellspacing=1 width=100%
HTML

$count=0;
foreach $mod(@modules){
 chomp $mod;
 $count++;
 if ($count == 1){
print trtd class=tdl$mod/td\n;
 }
 if ($count == 2){
print td class=tdl$mod/td\n;
 }
 if ($count == 3){
print td class=tdl$mod/td/tr\n;
$count = 0;
 }
}

print HTML;
 /table/html
HTML

exit;

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: comparing hashes

2007-01-13 Thread Bill Jones

On 1/13/07, xavier mas [EMAIL PROTECTED] wrote:


Yes, this is the code I use, but still doesn't work to me and I can't find the
cause.


Have you looked the results using Data::Dumper?  Maybe the results
aren't as expected?

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: Help with URI encode

2007-01-13 Thread Bill Jones

On 1/4/07, Jm lists [EMAIL PROTECTED] wrote:

what's the encode format for %BD%F1%C8%D5%C5%C5%D0%D0 ?Thank you.


It's another way for spammers to hide URLs, etc.

Try this:

use strict;
my $val = %BD%F1%C8%D5%C5%C5%D0%D0;
print Looking at $val ;
$val =~ s/%([0-9a-f][0-9a-f])/chr(hex($1))/ieg;
print ... Should be $val \n;

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindexsearch=0x2A46CF06fingerprint=on

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: CYGWIN Uninstall

2006-12-09 Thread Bill Jones

Delete the CygWin Folder ... geez.

PS - This is OT and definitely falls under the category of learn to
use your chosen platform.  (God knows I myself have been told that
many times and I do not post this advice lightly.  Learn to use the
operating environment you picked.)
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: CGI XML

2006-12-07 Thread Bill Jones

On 12/7/06, Beginner [EMAIL PROTECTED] wrote:

my $xml = eval {XMLin($fh, SuppressEmpty = 1, ForceArray =
qr/item/) };



CGI::Lite and then use $cgi-parse_new_form_data; to get the XML into
your $xml hash.

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Modules inter-relay ?

2006-12-04 Thread Bill Jones

On 12/4/06, Mug [EMAIL PROTECTED] wrote:

 BEGIN {
 unshift (@INC, /special);
 unshift (@INC, /special/packages);
 }

 use strict;
 use InitGlobal;



And if I didn't get mis-understood on what I've studied, 'use' still
comes earlier than 'BEGIN{}', so what is the mystery why this
method can do that ?


In this particular case BEGIN comes first and simply tells Perl to
look at /special and /special/packages BEFORE looking anywhere else
for the packages you wish to use in your various projects.

You still need to make sure the proper functions/sub-routines are
exported so that your code is called in preference over the Perl
code.

However, if you wish to control what is required -- say branch
logic, you will need to stick with te 'require' directive as use
packages referenced will always be brought in even if they are not
called.

HTH/-Sx-
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Out of memory!, while extending scalar with vec()

2006-12-03 Thread Bill Jones

On 12/3/06, kyle cronan [EMAIL PROTECTED] wrote:

(1$ARGV[0])


Just a thought -

The argument you are passing is really the two's complement; so you
are really passing 256M (not 28) to the vec statement.

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: goto return ?

2006-12-03 Thread Bill Jones

On 11/24/06, JupiterHost.Net [EMAIL PROTECTED] wrote:


The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...


I guess I'm totally confused; I don't see how a goto can return back
to the sub-rotine that called it:

#! perl -w

use strict;

my $global = 99;

main();
# The below goto returns here -- not back to the sub-routine.
print Primary: Did I catch the new value $global?\n;

exit;

sub main() {
 print Main0: \$global is $global\n;
 goto the_goto if $global =~ /99/; # Goto does NOT return back here...

 $global = 60;
 print Main1: Did I catch the new value $global?\n;
}

sub the_goto() {
 print Goto0: \$global is $global\n;
 $global = 0;
}

__END__

The use of goto in this content is like using AUTOLOAD which causes
the called routine to not return back to where it was called from but
actually continue at the point AFTER the previous routine -- a little
confusing to us beginners.

HTH!  =)
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Checking for infinite loops

2006-12-03 Thread Bill Jones

On 12/2/06, hOURS [EMAIL PROTECTED] wrote:

But I think we can ignore all those questions, because I don't see a need to 
work with this example.  I'm just looking for someone to tell me how alarm 
works.  A few sentences in English will be fine.  No code really need be 
written.


Old multi processor systems used two methods for interrupting the
current process/thread -- hardware timers and/or software signals.

The method Perl (and most modern systems) uses today is software signals.

Think of it as a polite way to say PMFJI to the current
thread/process.  The alarm simply installs a kernel-level process to
interrupt the target thread/process when a previously determined
event occurs.

HTH/-Sx-
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Modules inter-relay ?

2006-12-03 Thread Bill Jones

On 12/4/06, Mug [EMAIL PROTECTED] wrote:


Say I have 2 modules ( below pseudo codes ) , which the first
package ( InitGlobal ) will be used through out the other project
modules. However, InitGlobal itself would relay on some other
modules, which the modules using InitGlobal too.



You can place the special packages in their own directory and point to it:

BEGIN {
   unshift (@INC, /special);
   unshift (@INC, /special/packages);
}

use strict;
use InitGlobal;

HTH/-Sx-
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Sorting from subroutine call

2006-12-02 Thread Bill Jones

On 12/2/06, Sergio Escalada [EMAIL PROTECTED] wrote:

The purpouse of this mini-script is to list the rows from a database loaded
in memory ($ref_db is the reference to hashtable


Another idea -

sub sortrows {
  my $sorted = @_;
  $sorted = -(($a-{ahash} eq 'x') = ($b-{ahash} eq 'x')) if $sorted == 0;
  $sorted = (lc($a-{string}) cmp lc($b-{string})) if $sort == 0;
  $sorted;
}

foreach $row (sort sortrows @$rows) {
... blah blah ...

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: check for def

2006-12-01 Thread Bill Jones

On 12/1/06, David Bear [EMAIL PROTECTED] wrote:

I would like to do something like (psuedo coded)


Whats wrong with what you posted previously?


The goal of course is to make sure that %params has some hash table
available even if the script is not called in a cgi environment.

Any pointers?


Yes, the 'use CGI' stuff will work even on the command-line (ie, when
not used in a CGI/HTTP gateway) environment.

HTH/-Sx-
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: check for def

2006-12-01 Thread Bill Jones

[sorry for following up my own post]

On 12/1/06, Bill Jones [EMAIL PROTECTED] wrote:

Yes, the 'use CGI' stuff will work even on the command-line (ie, when
not used in a CGI/HTTP gateway) environment.


A specific example -

#! /usr/bin/perl -wT

use CGI;
use strict;
use warnings;
use diagnostics;

my $q = CGI-new();
my %params = $q-Vars;

# See http://hoohoo.ncsa.uiuc.edu/cgi/env.html
if ($ENV{GATEWAY_INTERFACE} and $ENV{GATEWAY_INTERFACE} =~ /CGI/i) {
 print Content-Type: text/html\r\n\r\n ... I'm running as a CGI ...br/;

 foreach my $key (keys %ENV) {
   print $key -- $ENV{$key}br/;
 }
}

print PRE\n if $ENV{GATEWAY_INTERFACE};
 foreach my $f (keys (%params)) {
   print $f: $params{$f}\n;
 }
print /PRE\n if $ENV{GATEWAY_INTERFACE};

__END__


And on the command-line call it like:
perl -wT somefile.pl some variables and params

Via the www call it like:
http://somehost/some/path/someprog.cgi?varx=varythis=that

You get example output like this (via WWW)
... I'm running as a CGI ...
SCRIPT_NAME -- /~bjones/index.cgi
SERVER_NAME -- fc6.insecurity.org
SERVER_ADMIN -- [EMAIL PROTECTED]
HTTP_ACCEPT_ENCODING -- gzip,deflate
HTTP_CONNECTION -- keep-alive
REQUEST_METHOD -- GET
HTTP_ACCEPT --
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
SCRIPT_FILENAME -- /home/bjones/public_html/index.cgi
SERVER_SOFTWARE -- Apache/2.2.3 (Debian) mod_python/3.2.10
Python/2.4.4c0 PHP/4.4.4-8 mod_perl/2.0.2 Perl/v5.8.8
HTTP_ACCEPT_CHARSET -- ISO-8859-1,utf-8;q=0.7,*;q=0.7
QUERY_STRING -- varx=varythis=that
REMOTE_PORT -- 40145
HTTP_USER_AGENT -- Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.0.7)
Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2)
SERVER_PORT -- 80
SERVER_SIGNATURE --
Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4c0 PHP/4.4.4-8
mod_perl/2.0.2 Perl/v5.8.8 Server at fc6.insecurity.org Port 80

HTTP_ACCEPT_LANGUAGE -- en-us,en;q=0.5
REMOTE_ADDR -- 127.0.1.1
HTTP_KEEP_ALIVE -- 300
SERVER_PROTOCOL -- HTTP/1.1
PATH -- /usr/local/bin:/usr/bin:/bin
REQUEST_URI -- /~bjones/index.cgi?varx=varythis=that
GATEWAY_INTERFACE -- CGI/1.1
SERVER_ADDR -- 127.0.1.1
DOCUMENT_ROOT -- /var/www/
HTTP_HOST -- fc6.insecurity.org

varx: vary
this: that

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Net::EasyTCP

2006-12-01 Thread Bill Jones

On 11/30/06, Derek B. Smith [EMAIL PROTECTED] wrote:

but not all clients have ssh running and other nuances
such as no root ssh sign-in, no ftp, and /etc/passwd
is protected from downloads and reads by anyone but
root.


Well, since we seem to be going down this path -- you could try
hacking around with the fish protocol:

http://linuxmafia.com/faq/Security/fish-protocol.html

Maybe make it work even if ssh doesn't ...

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: ways to iterate over params

2006-11-30 Thread Bill Jones

On 11/30/06, David Bear [EMAIL PROTECTED] wrote:


my $q = CGI-new();
my %params = $q-Vars;
foreach $f (keys (%params)) {
   print $f is $params{$f} ;
}


use CGI;

my $q = CGI-new();
my %params = $q-Vars;
foreach my $f (keys (%params)) {
 print $f is $params{$f}\n;
}

--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: getting files from the internet

2004-10-19 Thread Bill Jones

--- Jeff Herbeck [EMAIL PROTECTED] wrote:

 I want to be able to have webtv users (who can't save files locally)
 to each have their own user account to log into the apache login,
 then
 type a URL of a file that they want to put into their own
 folder/webspace.


Yes, then once they are authenticated you can switch them to their own
directory.  The path to a solution is designing a site layout which
differeniates between a local filesystem versus a URL filesystem.

Legal issues aside - you only need to write a Apache Basic
Authentication script via .htaccess and set the filesystem scripts to
that user -- very straight forward.

Um, may I ask?  how much hard drive space are you allowing them to use?
 How much band-width does your system have to actually go and get
these URL resources they wish to save on your host?

Plenty of almost free URL fielsystem services on the Internet now --
how is your service different?

-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Reimplement CPAN as a Torrent?

2004-10-19 Thread Bill Jones
Should CPAN be re-implemented as a Torrent?  P2P is really hot and
raging in some circles.  Maybe torrents can benefit us in legal ways?

At any rate, this is a new torrent on SuprNova:
http://66.90.75.92/suprnova//torrents/2545/Perl%20Programming%20Books.torrent

If you like them - you should buy them!

ORA has been good to the Open Source and especially Perl communities;
not to mention the book authors spent a good deal of time writing
them...

=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: getting files from the internet

2004-10-18 Thread Bill Jones

--- Jeff Herbeck [EMAIL PROTECTED] wrote:

 192.168.1.200 - - [18/Oct/2004:07:36:06 -0500] GET
 /cgi-bin/test/test.cgi HTTP/1.1 401 1248 - Mozilla/4.0
 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
 127.0.0.1 - - [18/Oct/2004:07:36:11 -0500] GET /arch.doc HTTP/1.1
 200 27136 - LWP::Simple/5.800
 192.168.1.200 - jeff [18/Oct/2004:07:36:09 -0500] GET
 /cgi-bin/test/test.cgi HTTP/1.1 200 25 - Mozilla/4.0 (compatible;
 MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)


I woud say $remote_user isn't being set then.

Is this page authenticated?  So the CGI knows who the $remote_user is?
-Sx-

=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: getting files from the internet

2004-10-18 Thread Bill Jones
[this is not a question - it is just a small follow-up]

This code only gives me 404 File Not found -- 
which is correct behaviour -

#!/usr/bin/perl

use strict;
use warnings;

use HTTP::Response;
use LWP::Simple 'getstore';

my $url = 'http://insecurity.org/test.doc';
my $remote_user = $ENV{REMOTE_USER} || 'unknown_user';
my $response= HTTP::Response-new( 
getstore( $url, /$remote_user/test.doc ) );

print
   Content-type: text/html\n\n,
   $response-status_line();

__END__


NOTES -- the /$remote_user/test.doc section collapses into:

//test.doc -- because the User is not set -- and the // is evaluated
(at least on my server) as $WWW_DOC_ROOT/path/to/file

So, AFAIC, it is working.

cheers;
-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: getting files from the internet

2004-10-18 Thread Bill Jones

--- Jeff Herbeck [EMAIL PROTECTED] wrote:

 but the directory it goes to has to be owned by apache.  Is there
 any way it can be made to be owned by the remote user?


Dynamically set ownership of an unknown user?  Yes -

But why would you want to do that?
-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Executing pdflatex via CGI script

2004-10-17 Thread Bill Jones

--- Jan Eden [EMAIL PROTECTED] wrote:

 a) create / write to a file
 b) apply pdflatex to that file (i.e. create a pdf file from the .tex
 source)
 c) open the resulting pdf file (using the open function in OS X)


Set Group ID Directories?
Um, allow the pdflatex to run as the web userid?
Maybe just make a CGI writable directory?

Put the correct WWW userid in the right pdflatex group?
-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/




__
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: getting files from the internet

2004-10-17 Thread Bill Jones

--- Jeff Herbeck [EMAIL PROTECTED] wrote:

 This code gives me a 500 internal server error.

And the WWW Server Logs say - what?

-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Capturing PID of Shell Calls

2004-10-11 Thread Bill Jones

--- Jamie Bridges [EMAIL PROTECTED] wrote:

 I am attempting to collect the PIDs of system/backtick calls ( up to
 40 of 
 them ) and revisit them to ensure that they completed.  The frontend 
 interface is CGI but in this case that part is working fine.  I
 cannot, 
 however, find anything in my 15 O'Reily books or Google which
 includes how 
 to do this without using a shell script to record the information. 


:)

You should study CPAN more -

http://search.cpan.org/search?query=PIDmode=all

This issue HAS come up before and there are solutions (also as per
Bob's posting regarding fork, et al.)

Perl and Unix have been hand-in-hand for a long time -- take advantage
of this.

-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/




__
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: how to execute a perl file in cgi?

2004-10-10 Thread Bill Jones

--- Gunnar Hjalmarsson [EMAIL PROTECTED] wrote:

 Bill Jones wrote:
  The third way - `` (back-ticks) is highly discouraged.
 
 Discouraged? Why? I thought that was depending on what exactly it is
 you want to do, e.g. whether you want to capture the output from the
 script you run.


Well, it is definitely a matter of taste, true.  There are cleaner ways
to capture the external program's output.

Personally I have seen, in my short time programming in Perl, that some
versions of Perl have at times executed `` (back-ticks) as if they were
contained inside a BEGIN block -- that is prior to executing my code in
correct sequence.

Don't misundertsnad me, I have used back-ticks a lot.  I just feel
there are better (read: clearer) ways to start an external program from
Perl.

:)
-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: how to execute a perl file in cgi?

2004-10-10 Thread Bill Jones

--- Xiangli Zhang [EMAIL PROTECTED] wrote:

 Since I want to analyse a complicated problem involved with one
 file.pl, I am suspect the .pl file was not executed. I tried with
 very simple file.pl only printing one line, but it does not work. The
 following is the code:
  
 the cgi file
  
  
 #!/usr/bin/perl
 use lib '/srv/www/cgi-bin/phrap';
 
 print Content-type: text/html\n\n;
 print htmlheadtitlePerl CGI Example # 2;
 print /title/headbodyh1;
 print Alignment Result /h1p;
 print pre;
 
 system(perl, /srv/www/cgi-bin/phrap/testL.pl);
 print /pre;
 print /p;
 print /body/html;
 
 the .pl file testL.pl
  
 #!/usr/bin/perl
 print %%\n\n;
 


A series of Percent signs is significant to the resulting web browser;
please try to use a sim ple, plain old, ASCII text - maybe just Hi, I
am the testL programs output ???

  
 testL.pl is in the folder '/srv/www/cgi-bin/phrap', both of the files
 have maximum permissions
  
 I am suspecting the problem is related to configuration of Apache web
 server. Is it possible? Since, the exact files work fine in one
 server, but not in the other. 
  
 I am not so familiar with Apache configuration, just know some basic
 things.
  
 Any suggestions?


How do you know that the use lib is working?  Can you prove the
programs both work for the command line first - before you try them as
CGIs?

As far as apache is concerned I suggest:

http://httpd.apache.org/docs-2.0/howto/cgi.html

:)
-Sx-



=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: how to execute a perl file in cgi?

2004-10-09 Thread Bill Jones

--- Xiangli Zhang [EMAIL PROTECTED] wrote:

 Can anybody tell me how to execute a perl file in perl cgi? E.g
 test.cgi  and file.pl, I want to add one line to execute file.pl
 in test.cgi. How I can do it?

There are two paths you can choose for execution:

system - which executes and then returns control.
exec - which executes and doesnt return control.

The third way - `` (back-ticks) is highly discouraged.

Cheers;
-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: undefined value error

2004-10-02 Thread Bill Jones

--- David Kirol [EMAIL PROTECTED] wrote:

 Xiangli Zhang wrote:
  I got the following error when one cgi file 'test.cgi' was called
 from HTML:
   
  Can't call method sequence on an undefined value 
  use DNAseq;
  print Content-type: text/html\n\n;


 Justin,
   I think you are making a basic 'cgi' error. The error may stem from
 the 
 fact that the 'State' of the html page cannot change once it is 
 printed.
 Try moving all of the statements that might change the state of the 
 script (i.e.
 chdir(/srv/www/httmp/default/chromat_dir);
snip ...
 and so on)
 ahead of the html header
 print Content-type: text/html\n\n;


If that works I would be surprized.  The original error states that a
subroutine in package DNAseq is at fault -- I thought this was asked
and answered already anyways?

-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: cant read cookie values from popup window....... plzz help me........

2004-09-21 Thread Bill Jones

--- manoj tr [EMAIL PROTECTED] wrote:

  i send thecode that i corrected as follows.



   $cookie = $output-cookie(-name = 'uid', -value = u100', -expires
 = '+1d');


Well, for one, your quotes are unba;nced starting at the above line.

Also, I would use -

use strict;
use warnings;
use diagnostics;


HTH;
-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: HINT: regex coach

2004-09-14 Thread Bill Jones

--- NYIMI Jose (BMB) [EMAIL PROTECTED] wrote:


   http://www.weitz.de/regex-coach/
  
  Just so this message isn't left unanswered, I'll state:
 
 This hint have been sent many times to this list that's may be why
 There wasn't reactions to this message ?


As was already mentioned:  Hard to reviewed/evaluate/use a prgram with
such a narrow OpSys focus.

-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Mailing Script

2004-07-14 Thread Bill Jones
--- Gunnar Hjalmarsson [EMAIL PROTECTED] wrote:
  One web surfer - one web page.
 
 Don't understand what you mean by that.
 

:)

Well YOU ask THEM to surf to YOUR web site to fill out and HTML page =/

:)

But then you E-MAIL them a reply.  Why not just say what you want on
the web page itself?

Believe me - I understand you have a CPAN module for replying via
e-mail (I seen it) - http://search.cpan.org/~gunnar/ - however wouldn't
it be simple to just display the response and not mail it? 
Communication doent have to flow from the WWW-to-SMTP.

Just a thought :)
-Sx-


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Mailing Script

2004-07-12 Thread Bill Jones
--- Randal L. Schwartz [EMAIL PROTECTED] wrote:
  Werner == Werner Otto [EMAIL PROTECTED] writes:
 Werner $email   = param(email);

 Do *not* send email to addresses taken from forms.  Ever.


HTML + CGI + E-Mail = VeryBadThing...


Well, at any rate, the best place to see if you are listed is at:

http://groups.google.com/groups?hl=enlr=ie=UTF-8group=news.admin.net-abuse.sightings

Search that group for your domain and/or mail/mta host...


Enjoy!
-Sx-  :)


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Mailing Script

2004-07-12 Thread Bill Jones
--- Gunnar Hjalmarsson [EMAIL PROTECTED] wrote:
 one submitted address, the messages are plain text, and the size is
 limited). If some idiot would use it for sending unsolicited messages
 (has never happened so far), I would know and would be able to take
 actions.
 
 The only realistic option is to skip the copy to the sender. But I
 don't want to do that. For the sake of convenience.


Um, your link is to a web server and you can display a web page --
convienent, no?

Why send mail outside your system anyway then?  One web surfer - one
web page.

:)
-Sx-

=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: OT: mysql vs. postgresql (was: Re: CGI and mySQL book, any recommendation.)

2004-06-02 Thread Bill Jones
Wondering whether MySQL or Postgres is faster (or better) via CGI
(which is the topic of this list) is sort of like wondering whether a
JAPH which has less characters is in fact faster that longer equivalent
code - all without looking at maintenance, ease of use, and
understandability.  I know that everything I say here can be twisted in
either favor for or against Postgres.

I know from 5+ years of professional use that MySQL is more prevalent
(like MS Windows for an example.)  However, Postgress has had better
features longer and sooner than MySQL -- however with the recent SAP
code base and MySQL-SAP-MaxDB feature set merger maybe this will no
longer be such a determining factor.

However, the fact remains - Postgres is open source with an acceptable
open source license - MySQL (of any particular feature set) isn't.

In years past there was a long discussion of whether writing Perl using
modules was any faster than writing Perl with out -- the discussion
seemed to end up on the my code can beat up your code and nothing of
any true importance was decided upon - again all of this is of personal
choice.

I for one have abandoned Windows since 1995 and have been 90%
Unix-based in my personal life since but even I support clients who
insist on using Windows and I do so without judging these paying
clients as I am sure Merlyn will support paying clients who insist on
using MySQL.

In my own utilization and application deployments I have feel that
Postgres is a stable long-term professional choice which will perform
well within high-end multi CPU architectures.  I have been disappointed
in all application roll-outs of MySQL -- and it is true that could be
attributed to the fact that I didnt write any of them -- all were
inhererited or purchased as part of a larger software deployment.

Again all of this is highly application design specific as well as
OpSys dependent.  On my MySQL server I had 6 CPUs, 6GB of RAM, and a
125GB of drive space -- at 25,000 concurrent CGI hits per second the
server was crawling; peaked at over 99% for hours on end.  Not once
during the time I used MySQL was the platform (Solaris 8) nor the
development language (Perl) ever in question - the vendor always blamed
the tuning and performamnce of MySQL.  That vendor dropped MySQL and
switched to Oracle so they could better utilize SQL triggers as well as
Transaction roll-back and roll-forward capabilities.  I would say that
MySQL is better in many regards than Oracle -- but many of you would
very likely disagree.

So, in closing, lets just say that not everyone likes all database
development systems.

Thank you for your time in reading all this;

Bill
(aka -Sx-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: CGI and mySQL book, any recommendation.

2004-06-01 Thread Bill Jones
Greetings =)

--- Randal L. Schwartz [EMAIL PROTECTED] wrote:
 The only reason to use MySQL these days is ignorance or legacy.


Even Blackboard, a major CMS / distance learning software developer,
abandoned MySQL in favor of baby Oracle.

(Baby Oracle is no better than PostgresSQL IMO.  Plus PostgresSQL is
free.)

Regards;
-Sx-

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Template

2004-05-24 Thread Bill Jones

--- Werner Otto [EMAIL PROTECTED] wrote:
 Hi there,
 
 How to I include or call another cgi script from a current one.

 What does the syntax look like?


Don't do it that way; See  perldoc require

That is what I would recommend - otherwise you would need to have the
called cgi call your original script again -- OR, you can simply do
this (as an example only and not called as a cgi - there isn't any need
to do it that way) --

if (condition) {
  # Rebuild each Categories index.html file...
  chdir(/HR/AP);
  system(/rt/apache2/cgi/CreateIndexes.pl AP  /HR/AP/index.html);
}


If you *must* try it as a cgi, then use the HTTP Location header like
this:

print Location
/cgi/some.cgi?SomeParams=SomeDatasomeotherParams=SomeotherData\n\n;
exit;

You have to exit the current CGI as there is no way to get back to it -
the WWW is stateless in this regard. That is why I strongly recommend
doing what you are attempting in one stroke.

(PS - What Jan suggested really is the best way IMHO.)
HTH/Bill


=
-Sx-
seeking employment: http://youve-reached-the.endoftheinternet.org/




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Anonymous scope ?

2001-10-05 Thread Bill Jones

Another Stew-pid question  :]

Given -

{
my $var = 100;
print \$var is $var\n;

}

print But here \$var is $var\n;


How can I or is there a way to get outer $var to be equal to 100 without
making $var global?  Also, you're not allowed to set it to 100 outside of
the anonymous sub either.


???
-Sx-

PS - Also, I *know* this is bad code (especially when under -w, strict, or
diagnostics -- so please don't slam me about that.)


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Anonymous scope ?

2001-10-05 Thread Bill Jones

On 10/5/01 12:50 PM, Michael Fowler [EMAIL PROTECTED] wrote:

 Also, you're not allowed to set it to 100 outside of the anonymous sub
 either.
 
 Sure you are, you just have to declare the variable outside of the anonymous
 sub.
 


Not in this *example test* world I created for students (at least I didn't
want them too.)  Recently I started teaching Perl as an Internet Programming
class (CGS2557) here at FCCJ and one of my students asked if it was possible
to get at it somehow - I said I didn't think so, but to be sure I wanted to
ask here.


Thx for the reply :)
-Sx-


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: problem in writing code(switch/case)or enum

2001-10-04 Thread Bill Jones

On 10/4/01 2:54 AM, Rahul Garg [EMAIL PROTECTED] wrote:

 what i want is :
 
 $s_month can be 1 to 12
 if($s_month == 1){$s_month = 'JAN'};and so on
 how can i do it.

?

http://www.cpan.org/authors/id/S/SN/SNEEX/cal.perl_v2A


HTH/-Sx-  :]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [Fwd: Perl split to HTML]

2001-10-04 Thread Bill Jones

On 10/4/01 10:55 AM, Tom Burkhardt [EMAIL PROTECTED] wrote:

... A bunch of HTML deleted...

 -- 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 my $imMe = '-Sx-';

 print _HEREDOCS;

Has this list discussed HERE DOCS ?

If not recently, maybe now is a good time?
$imMe

PS  -  For ease of access, the Perl manual has been split up into several
sections:

   perlPerl overview (this section)
   perldelta   Perl changes since previous version
   perl5005delta   Perl changes in version 5.005
   perl5004delta   Perl changes in version 5.004
   perlfaq Perl frequently asked questions
   perltoc Perl documentation table of contents

   perldataPerl data structures
   perlsyn Perl syntax
   perlop  Perl operators and precedence
   perlre  Perl regular expressions
   perlrun Perl execution and options
   perlfuncPerl builtin functions
   perlopentut Perl open() tutorial
   perlvar Perl predefined variables
   perlsub Perl subroutines
   perlmod Perl modules: how they work
   perlmodlib  Perl modules: how to write and use
   perlmodinstall  Perl modules: how to install from CPAN
   perlformPerl formats
   perlunicode Perl unicode support
   perllocale  Perl locale support

   perlreftut  Perl references short introduction
   perlref Perl references, the rest of the story
   perldsc Perl data structures intro
   perllol Perl data structures: arrays of arrays
   perlbootPerl OO tutorial for beginners
   perltootPerl OO tutorial, part 1
   perltootc   Perl OO tutorial, part 2
   perlobj Perl objects
   perltie Perl objects hidden behind simple variables
   perlbot Perl OO tricks and examples
   perlipc Perl interprocess communication
   perlforkPerl fork() information
   perlthrtut  Perl threads tutorial
   perllexwarn Perl warnings and their control
   perlfilter  Perl source filters
   perldbmfilter   Perl DBM filters

   perlcompile Perl compiler suite intro
   perldebug   Perl debugging
   perldiagPerl diagnostic messages
   perlnumber  Perl number semantics
   perlsec Perl security
   perltrapPerl traps for the unwary
   perlportPerl portability guide
   perlstyle   Perl style guide

   perlpod Perl plain old documentation
   perlbookPerl book information

   perlembed   Perl ways to embed perl in your C or C++
application

   perlapioPerl internal IO abstraction interface
   perldebguts Perl debugging guts and tips
   perlxs  Perl XS application programming interface
   perlxstut   Perl XS tutorial

   perlgutsPerl internal functions for those doing
extensions

   perlcallPerl calling conventions from C
   perlapi Perl API listing (autogenerated)
   perlintern  Perl internal functions (autogenerated)

   perltodoPerl things to do
   perlhackPerl hackers guide
   perlhistPerl history records

   perlamiga   Perl notes for Amiga
   perlcygwin  Perl notes for Cygwin
   perldos Perl notes for DOS
   perlhpuxPerl notes for HP-UX
   perlmachten Perl notes for Power MachTen
   perlos2 Perl notes for OS/2
   perlos390   Perl notes for OS/390
   perlvms Perl notes for VMS
   perlwin32   Perl notes for Windows

(If you're intending to read these straight through for the first time, the
suggested order will tend to reduce the number of forward references.)



_HEREDOCS


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: suggestions?

2001-10-03 Thread Bill Jones

On 10/2/01 4:06 PM, _brian_d_foy [EMAIL PROTECTED] wrote:


   RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon[OR]
 
 you're generous.  i just F them outright.


True, of course.  But I use Perl and Apache here FCCJ to teach 1-2 yr
college students in Open Source technologies, etc.

They *need* the long winded version at times...
-Sx- 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: anti-SSSCA petition

2001-10-03 Thread Bill Jones

On 10/3/01 2:46 PM, Peter Cline [EMAIL PROTECTED] wrote:

 At 02:39 PM 10/3/01 -0400, Bill Jones wrote:
 On 10/3/01 1:56 PM, Michael [EMAIL PROTECTED] wrote:
 
 
 http://www.petitiononline.com/SSSCA/petition.html
 
 text of bill is available here:
 www.parrhesia.com/sssca-draft.pdf


Peter:

LOL :)
That is the worst looking FAX I've seen in a while.

I'll read and get back to the list (even thought this is way OT...)
-Sx-

PS - Maybe we could use various Perl PDF module(s) to clean it up and bring
this back on topic?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: anti-SSSCA petition

2001-10-03 Thread Bill Jones

[original post edited]

 But, if you can come up with a way to sign it using
 Perl :)


I will look at it  :)  I found a good starting spot:

79 modules found in 11 distributions matching 'PDF'
  
PDF-111  by  Antonio Rosella Released
14th February 2000 
PDF  - Library for PDF access and manipulation in Perl  
PDF::Core  - Core Library for PDF library  
PDF::Parse  - Library with parsing functions for PDF library  
 
PDF-API2-0.1.5_unstable  by  Alfred Reibenschuh Released
2nd October 2001 
PDF::API2  - The Next Generation API for creating and modifing PDFs.  
PDF::API2::Color  - A OO-Color Module for PDFs. 0.10
PDF::API2::MD5   1.50
PDF::API2::UniMap   0.20
PDF::API2::Util    
Text::PDF::AFont  - Embedding of Adobe PFB/PFA + AFM format fonts. Inherits
from 0.50 
Text::PDF::Array  - Corresponds to a PDF array. Inherits from PDF::Objind
  
Text::PDF::Bool    
Text::PDF::Dict  - PDF Dictionaries and Streams. Inherits from PDF::Objind
  
Text::PDF::File  - Holds the trailers and cross-reference tables for a PDF
file 0.13 
Text::PDF::Filter    
Text::PDF::Name  - Inherits from Text::PDF::String and stores PDF names
(things   
Text::PDF::Number  - Numbers in PDF. Inherits from Text::PDF::String  
Text::PDF::Objind  - PDF indirect object reference. Also acts as an abstract
  
Text::PDF::Page  - Represents a PDF page, inherits from Text::PDF::Pages
  
Text::PDF::Pages  - a PDF pages hierarchical element. Inherits from
Text::PDF::Dict  
Text::PDF::SFont  - PDF Standard inbuilt font resource object. Inherits from
  
Text::PDF::String  - PDF String type objects and superclass for simple
objects   
Text::PDF::TTFont  - Inherits from Text::PDF::Dict and represents a TrueType
  
Text::PDF::TTFont0  - Inherits from PDF::Dict and represents a TrueType Type
0   
Text::PDF::Utils  - Utility functions for PDF library  
 
PDF-Create-0.01  by  Fabien Tassin Released
6th November 1999 
PDF::Create  - create PDF files 0.01
PDF::Create::Outline   0.01
PDF::Create::Page   0.01
 
PDF-Labels-1.8  by  Owen DeLong Released
14th February 2001 
PDF::Labels  - Routines to produce formatted pages of mailing labels in PDF
1.80 
 
PDFLib-0.03  by  Matt Sergeant Released
6th June 2001 
PDFLib  - More OO interface to pdflib_pl.pm 0.03
 
PDFREP-1.01  by  Trevor Ward Released
10th July 2001 
PDFREP   1.01 
pdftest     
 
Pod-HtmlPsPdf-0.04  by  Stas Bekman Released
31st August 2001 
Pod::HtmlPsPdf  - documentation projects builder in HTML, PS and PDF formats
0.04 
Pod::HtmlPsPdf::Book   0.00
Pod::HtmlPsPdf::Chapter    
Pod::HtmlPsPdf::Common    
Pod::HtmlPsPdf::Config    
Pod::HtmlPsPdf::Html   1.01
Pod::HtmlPsPdf::RunTime    
 
Pod-Pdf-1.2  by  Alan J. Fry Released
31st May 2000 
Pod::Pdf   1.20
 
Text-PDF-0.16  by  Martin Hosken Released
21st July 2001 
Text::PDF::Array  - Corresponds to a PDF array. Inherits from PDF::Objind
  
Text::PDF::Bool    
Text::PDF::Dict  - PDF Dictionaries and Streams. Inherits from PDF::Objind
  
Text::PDF::File  - Holds the trailers and cross-reference tables for a PDF
file 0.16 
Text::PDF::Filter    
Text::PDF::Name  - Inherits from Text::PDF::String and stores PDF names
(things   
Text::PDF::Number  - Numbers in PDF. Inherits from Text::PDF::String  
Text::PDF::Objind  - PDF indirect object reference. Also acts as an abstract
  
Text::PDF::Page  - Represents a PDF page, inherits from Text::PDF::Pages
  
Text::PDF::Pages  - a PDF pages hierarchical element. Inherits from
Text::PDF::Dict  
Text::PDF::SFont  - PDF Standard inbuilt font resource object. Inherits from
  
Text::PDF::String  - PDF String type objects and superclass for simple
objects   
Text::PDF::TTFont  - Inherits from Text::PDF::Dict and represents a TrueType
  
Text::PDF::TTFont0  - Inherits from PDF::Dict and represents a TrueType Type
0   
Text::PDF::Utils  - Utility functions for PDF library  
 
Text-PDF-API-0.701.4  by  Alfred Reibenschuh Released
2nd October 2001 
Text::PDF::AFont  - Embedding of Adobe PFB/PFA + AFM format fonts. Inherits
from 0.50 
Text::PDF::API  - a wrapper api for the Text::PDF::* modules of Martin
Hosken.   
Text::PDF::API::Color  - A OO-Color Module for PDFs. 0.10
Text::PDF::API::GIF   0.10
Text::PDF::API::IOString  - Emulate IO::File interface for PDFs 1.02
Text::PDF::API::Image    
Text::PDF::API::Matrix   0.20
Text::PDF::API::REHLHA   0.02
Text::PDF::API::UniMap   0.20
Text::PDF::Array  - Corresponds to a PDF array. Inherits from PDF::Objind
  
Text::PDF::Bool    
Text::PDF::Dict  - PDF Dictionaries and Streams. Inherits from PDF::Objind
  
Text::PDF::File  - Holds the trailers and cross-reference tables for a PDF
file 0.13 
Text::PDF::Filter    
Text::PDF::Name  - Inherits from Text::PDF::String and stores PDF names
(things   
Text::PDF::Number  - Numbers in 

Re: References

2001-10-03 Thread Bill Jones

On 10/3/01 4:11 PM, Randal L. Schwartz [EMAIL PROTECTED] wrote:

 to the beginners list, not the beginnners-cgi list.

*Uncle*
-Sx- (Sorry.)


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Merge documents

2001-10-03 Thread Bill Jones

On 10/2/01 9:05 PM, Brett W. McCoy [EMAIL PROTECTED] wrote:

 All things are possible with Perl.
 


Well, caveats apply.

-Sx-  :]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: DELETE BLANK LINE

2001-10-03 Thread Bill Jones

On 10/3/01 11:49 AM, Pedro A Reche Gallardo
[EMAIL PROTECTED] wrote:

 By a blank line I mean any line   containing only white spaces,
 return, tab characters etc.


 chomp;
 s/\w//g;
 print Non-white space still in there\n unless length;

???
-Sx-


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: suggestions?

2001-10-02 Thread Bill Jones

 i have a problem in which i have a lists of Domain names ..k, and i need to
 get there matching email address of an external site but i cant arite a shell
 script so i was wondering if anyone has any ideas or code that can help me
 with what im doing?
 
 Get what matching email addresses?  Are you harvesting email addresses off
 of websites?


If so, please scan http://insecurity.org - I want to add your finger-print
to my server so I can block them.

Thx!
-Sx-  :]

PS - In case anyone was wondering, you *could* add this to your Apache httpd
config:

IfModule mod_rewrite.c
  RewriteEngine on
  RewriteLog /var/log/mod_rewrite.log
  RewriteLogLevel 0

# Check for moved URLs...
#  RewriteCond %{REQUEST_FILENAME} /(.+)?$  [OR]
  RewriteCond %{REQUEST_FILENAME} /perl(.+)?$   [NC,OR]
  RewriteCond %{REQUEST_FILENAME} /ora/(.+)?$   [NC,OR]
  RewriteCond %{REQUEST_FILENAME} /sneex(.+)?$
  RewriteRule ^.*$ http://insecurity.org/410.shtml [L]
#  RewriteRule ^.*$ http://insecurity.org/sneex/Perl_v2/ [R,L]

# Check for Code Red non-sense...
  RewriteCond %{REQUEST_FILENAME} \.ida?.+$ [NC]
  RewriteRule ^.*$ http://insecurity.org/403.shtml [L]
#  RewriteRule ^.*$ http://insecurity.org/notwindows.html [L]

# Check for 
  RewriteCond %{REQUEST_FILENAME} \.(exe|com)$  [NC]
  RewriteRule ^.*$ http://insecurity.org/403.shtml [L]
#  RewriteRule ^.*$ http://insecurity.org/notwindows.html [L]

# Sx: research further...
#  RewriteCond %{HTTP_USER_AGENT} ^[Ll]ynx[OR]
# [empty]   Email Magnet
# [empty]   eMailReaper

  RewriteCond %{REQUEST_FILENAME} \.+?$
  RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon[OR]
  RewriteCond %{HTTP_USER_AGENT} ^[Ee]mailWolf   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT  [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Crescent   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^CherryPicker   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^WebWeasel  [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Web.*Mole  [OR]
  RewriteCond %{HTTP_USER_AGENT} ^WebCollector   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^.*NEWT.*ActiveX[OR]
  RewriteCond %{HTTP_USER_AGENT} ^Slurp  [OR]
  RewriteCond %{HTTP_USER_AGENT} ^.*[Bb]ot   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Open[Ff]ind[OR]
  RewriteCond %{HTTP_USER_AGENT} ^Open[Bb]ot [OR]
  RewriteCond %{HTTP_USER_AGENT} ^[Ww]get[OR]
  RewriteCond %{HTTP_USER_AGENT} ^[Ll][Ww][Pp]   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^[Bb]ench[Mm]ark[OR]
  RewriteCond %{HTTP_USER_AGENT} ^[Pp]erl[OR]
  RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit[OR]
  RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.*   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO  [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Telesoft   [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster  [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL  [OR]
  RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.Mozilla/2.01 [OR]
  RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
  RewriteRule ^.*$ http://insecurity.org/403.shtml [L]
#  RewriteRule ^.*$ http://insecurity.org/nospam.html [L]
  # Include /usr/local/apache/nospam.conf
/IfModule



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI script to change user's password.

2001-10-02 Thread Bill Jones

 Hi,
 
 Recently I've received a task to write a script (CGI) to allow changing
 of user password on a web page. Basically I'm very new to CGIs and is
 facing a tremendous problem starting this task.
 
 Basically, the script is supposed to run on Apache (ran as nobody) and
 allow users to change their system password via web interface. I'm not
 too sure whether it can be done this way or is it right to be done this
 way. Therefore I seek help from here to reach a conclusion.
 
 Can any gurus advise me?


And for a really basic example (older than dirt itself) --

See http://web.fccj.org/~wcjones/WebPass.html

-Sx-

PS - if you are on Unix - Lincoln even wrote his own system; see How Do I
Change Passwords?  in the WWW Security Faq -
http://www.w3.org/Security/Faq/www-security-faq.html


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: running commands on UNIX from a cgi

2001-09-26 Thread Bill Jones

On 9/26/01 12:05 PM, Mr. CRJ. Clarke [EMAIL PROTECTED] wrote:

 I am having diffuculties running a unix command with variables obtained
 from a submitted via a web cgi script.
 the command is /gspq $var1 $var2
 $var1 and $var2 are obtained from a web and can be displayed but I
 cannot send these vaiable to a unix program resident on my server.
 using the command $result = `/gspq $var1 $var2`;
 I noticed that If I assign the values just before running the command
 withthe following :
 $var1 = testvalue1;
 $var2 = testvalue2;
 this works but I can not use values that I obtained from  the web. I
 fget th folowing error:
 Premature end of script header
 


Change you script thus:

#!perl -w  # or whatever line you use for your server.

 use strict;
 use diagnostics;

 use CGI qw(:all);
 use CGI::Carp qw/fatalsToBrowser/;

# Then the rest of your CGI...


That *should* display the error in your browser...

PS - What you are wanting/trying to do is *extremely* dangerous to the
system you are running such a script on...


HTH;
-Sx- 
__
I know you believe you understand what you think I said, but I am
not sure you realize that what you heard is not what I meant.
  :::  Richard Nixon



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: running commands on UNIX from a cgi

2001-09-26 Thread Bill Jones

On 9/26/01 6:06 PM, Chaka Clarke [EMAIL PROTECTED] wrote:

 What are the main dangers and what is the safer solution ?


The primary is trusting anyone to enter *normal* data.  If your script is
installed with read/write to the CGI directory then someone could construct
a command to write a file to that directory.

The main problem would come up if you are unsure what a person can and
cannot enter into your CGI and what the consequences are when the script
'eval's the input.

Ask the list - there are many better trained, more knowledgeable Perl
programmers - if, say [EMAIL PROTECTED] (Randal) says something is safe
to do then you can bet he knows what is talking about IF he says it's not.

If you're like me you will need to find out the hard way - by trying
something and seeing if it gets hacked.  Maybe they won't.

A safer solution?  Get to know and love -T (taint) when writing CGIs - it
will take some getting used to, but taint checking is your best friend - it
won't accept data it thinks is from an unreliable source (a submitted FORM
via the WWW is such a source.)


Start your search on security from two of my sites, if you'd like, at -
http://web.fccj.org/~wcjones/  and http://www1.fccj.org/wcjones/

Never take someone's advice without checking things out for yourself.

HTH;
-Sx-  :]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Security Mechanisms with Perl/Apache on an Hosted Website???

2001-09-25 Thread Bill Jones

On 9/25/01 11:10 AM, David Simcik [EMAIL PROTECTED] wrote:

 Hey folks,
 I'm trying to cobble together some form of authentication mechanism on a
 website I am building for a friend. His ISP uses Perl  Apache (it's on a
 linux box). I (obviously) don't have root priviledges and have limited
 access to the filesystem. What are my options (if any)??? I think some form
 of session management would go hand-in-hand with the authentication.
 
 Thanks!
 DTS
 


That is a big can of worms...

There are various ways to get what you want - some better and more secure
than others; but not having root access is not a big deal...

Something that may help point you in a better direction:
http://www.stonehenge.com/merlyn/WebTechniques/col49.html
http://www.stonehenge.com/merlyn/WebTechniques/col50.html

HTH;
-Sx-


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Security Mechanisms with Perl/Apache on an Hosted Website???

2001-09-25 Thread Bill Jones

On 9/25/01 10:26 AM, Bill Jones [EMAIL PROTECTED] wrote:

 That is a big can of worms...
 
 There are various ways to get what you want - some better and more secure
 than others; but not having root access is not a big deal...
 
 Something that may help point you in a better direction:
 http://www.stonehenge.com/merlyn/WebTechniques/col49.html
 http://www.stonehenge.com/merlyn/WebTechniques/col50.html
 
 HTH;
 -Sx-
 


Do'Oh!  That is a mod_perl solution :/  I don't suppose you have access to
the Apache server?  No, I didn't think so.

Let me think about it.  Maybe an .htaccess spin on the mod_perl solution?

???
Sx


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Certified in Perl?

2001-09-24 Thread Bill Jones

On 9/24/2001 3:51 PM, patrick hall [EMAIL PROTECTED] wrote:

 applications and resumes to let employers know I can
 do some Perl.
 
 Any ideas?


Write your resume in Perl; I did.  And, if you don't believe it works in
getting more interviews - it got me the job I have now  :)

Best;
-Sx- 
William C (Bill) Jones
Lead, Courseware Support Analyst
(Lead e-Systems Developer)
Florida Community College at Jacksonville
501 West State Street, Rm 229
Jacksonville, Florida  32202-4030
[EMAIL PROTECTED]
PHONE   (904) 632-3089
FAX (904) 632-3007
__
I know you believe you understand what you think I said, but I am
not sure you realize that what you heard is not what I meant.
  :::  Richard Nixon



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Beginner needs help ...

2001-09-24 Thread Bill Jones

On 9/24/2001 4:00 PM, Riggs, Joan [EMAIL PROTECTED] wrote:

 
 I am not a Perl programmer but I need help - does anyone do Unix Perl
 scripting that can assist me?
 I am sure it's pretty basic coding ... I need to parse out the
 /etc/group
 file to list all users and the groups they are in.


Huh?  Nothing is BASIC when you need a 'solution' - therefore basic may
equal trivial and trivial may equal not what you need...


At any rate - Here is something to get you started (you may need to fix
formatting issues because of mailing...) --

(This is a code fragment - not meant to work on it's own...)


my ($account, $passwd, $uid, $gid, $quota, $comment, $gcos, $home, $shell);


while (($account, $passwd, $uid, $gid, $quota,
$comment, $gcos, $home, $shell) = getpwent())
{
$gcos   = ''; # These two are not used...
$quota  = '';

$passwd = '';
$shell  = '';

... Do stuff ...
}


The things you should become familiar with -
 perldoc -f getpwent
 perldoc -f setpwent


HTH;
-Sx- 
William C (Bill) Jones
Lead, Courseware Support Analyst
(Lead e-Systems Developer)
Florida Community College at Jacksonville
501 West State Street, Rm 229
Jacksonville, Florida  32202-4030
[EMAIL PROTECTED]
PHONE   (904) 632-3089
FAX (904) 632-3007
__
I know you believe you understand what you think I said, but I am
not sure you realize that what you heard is not what I meant.
  :::  Richard Nixon



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: line with nothing

2001-09-24 Thread Bill Jones

On 9/24/01 10:53 AM, COLLINEAU Franck FTRD/DMI/TAM
[EMAIL PROTECTED] wrote:

 How can i repair (with a regular expression) a line with nothing inside ?



 s//what/;

???
-Sx- 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]