RE: Mail Problem

2002-10-31 Thread Scott Lutz
Dan, you might want to post the line in which you call config.cgi.
Are you using 'require'?

cheers,

scott

-Original Message-
From: Palm Optins [mailto:bootscat@;bellsouth.net]
Sent: Wednesday, October 30, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: Mail Problem
Importance: High


Hello Everyone,

Can someone help me with this.

I keep getting this error when I try to access this file.
http://www.host-4-you.net/Demo1/setup.cgi

The config file is in the same directory as the others.

At first I thought I was missing the 1; in the config file, but it's there.

Thanks and God Bless
Dan

Software error:
Can't locate config.cgi in @INC (@INC contains: /usr/lib/perl5/5.6.1/i686-linux
/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 
/usr/lib/perl5/site_perl) at
setup.cgi line 10.
For help, please send mail to the webmaster ([EMAIL PROTECTED]), giving this 
error
message and the time and date of the error.


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




removing modules

2002-11-08 Thread Scott Lutz
Does anyone have experience with removing modules installed using CPAN?
A Debian machine seg faults everytime I try to install a module, and so I want to try 
to remove the Compress::Zlib module.

Thanks for the help!

scott lutz

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




RE: removing modules

2002-11-08 Thread Scott Lutz
Never mind.
A small case of the Mondays :o)

scott lutz

-Original Message-
From: Scott Lutz 
Sent: November 8, 2002 10:37 AM
To: Beginners (E-mail)
Subject: removing modules


Does anyone have experience with removing modules installed using CPAN?
A Debian machine seg faults everytime I try to install a module, and so I want to try 
to remove the Compress::Zlib module.

Thanks for the help!

scott lutz

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




RE: ?????????:failure notice

2002-11-09 Thread Scott Lutz
Change that line from  : use Win32:ODBC;
to : use Win32::ODBC; (note the double colon)

-Original Message-
From: Angel Iliev Kafazov [mailto:angel.kafazov@;mail.bg]
Sent: November 9, 2002 10:38 AM
To: [EMAIL PROTECTED]
Subject: ?:failure notice


Hi,

I am trying to write a scipt which generates a web page based on a 
information is ACCESS database. First, I need another script which have 
to pass the information (user ID) to the one which will actually display 
the other page. I have to pass the infprmation only by clicking on a 
particular link. The scrpt that generates the web page gives me the 
following error:


syntax error at franowner.pl.txt line 1, near "use Win32:"
Execution of franowner.pl.txt aborted due to compilation errors.


the script is:


use Win32:ODBC;


$ownerid = $ENV{'QUERY_STRING'};
$DSN="db1"
$dbh = new Win32::ODBC($DSN);

$statement = "SELECT Field1, Field2, Field3, Field4, Field5, Field6 FROM 
Owners WHERE ID=$ownerid";

if ($dbh->Sql($statement)) {
   print "SQL failed.\n";
   print "Error: " . $db->Error() . "\n";
}


$sth = $dbh->prepare($statement);
$rv = $sth->execute || die "Cannot execute SQL
statement:\n$DBI:errstr\n";

($ownerfname,$ownerlname,$owneradd,$ownercity,$ownerst,$ownerzip) = $sth-
>fetchrow_arrayref;

When I try to access the database it gives me errors when I want to 
select from columns with manes which include space
__
12MB-POP3-WAP-SMS---TOBA-E-mail.bG
--

" Ako uckame u Bue agpec B mail.bg 
ugeme myk: http://www.mail.bg/new/ "

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


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




Installed Modules don't run Properly

2002-12-16 Thread Scott Lutz
Hello All!

I have searched Google, but it turned up nothing useful on this, so I figured that 
this would be a good place to ask next.
I just installed the DBD::mysql through the Debian package manager, but it doesn't 
seem to bode well with the compiled version of Perl I installed on the machine . . . 
;o|

Here is the error that gets returned when trying to run the module :
perl: relocation error: /usr/lib/perl5/auto/DBD/mysql/mysql.so: undefined symbol: 
perl_get_sv

Any thoughts?

thanks in advance!

scott

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




Can't make Storable

2003-01-07 Thread Scott Lutz
I need some pointers as to why the Storable module won't compile on my Intel/Debian 
machine.
I am not sure if recompiling DynaLoader would help, so if any one has any ideas, I 
would be most grateful.
This has failed using both CPAN and using the older 2.05 version I have.

Here is the complete output from the "make test":

# make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib 
-I/usr/local/lib/perl5/5.6.1/i586-linux -I/usr/local/lib/perl5/5.6.1 -e 'use 
Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/blessedCan't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/blessed.t line 26
Compilation failed in require at t/blessed.t line 26.
BEGIN failed--compilation aborted at t/blessed.t line 26.
t/blesseddubious 
Test returned status 255 (wstat 65280, 0xff00)
t/canonical..Can't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/canonical.t line 24
Compilation failed in require at t/canonical.t line 24.
BEGIN failed--compilation aborted at t/canonical.t line 24.
t/canonical..dubious 
Test returned status 255 (wstat 65280, 0xff00)
t/code...skipped
all skipped: tests only work with B::Deparse 0.61 and at least perl 5.6.0
t/compat06...Can't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/compat06.t line 28
Compilation failed in require at t/compat06.t line 28.
BEGIN failed--compilation aborted at t/compat06.t line 28.
t/compat06...dubious 
Test returned status 255 (wstat 65280, 0xff00)
t/croak..Can't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/croak.t line 26
Compilation failed in require at t/croak.t line 26.
BEGIN failed--compilation aborted at t/croak.t line 26.
t/croak..dubious 
Test returned status 255 (wstat 65280, 0xff00)
t/dclone.Can't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/dclone.t line 25
Compilation failed in require at t/dclone.t line 25.
BEGIN failed--compilation aborted at t/dclone.t line 25.
t/dclone.dubious 
Test returned status 255 (wstat 65280, 0xff00)
t/downgrade..Can't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/downgrade.t line 30
Compilation failed in require at t/downgrade.t line 30.
BEGIN failed--compilation aborted at t/downgrade.t line 30.
t/downgrade..dubious 
Test returned status 255 (wstat 65280, 0xff00)
t/forgiveCan't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/forgive.t line 31
Compilation failed in require at t/forgive.t line 31.
BEGIN failed--compilation aborted at t/forgive.t line 31.
t/forgivedubious 
Test returned status 255 (wstat 65280, 0xff00)
t/freeze.Can't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/freeze.t line 25
Compilation failed in require at t/freeze.t line 25.
BEGIN failed--compilation aborted at t/freeze.t line 25.
t/freeze.dubious 
Test returned status 255 (wstat 65280, 0xff00)
t/integerCan't load 'blib/arch/auto/Storable/Storable.so' for module Storable: 
libgcc_s.so.1: cannot open shared object file: No such file or directory at 
/usr/local/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
 at t/integer.t line 30
Compilation failed in require at t/integer.t line 30.
BEGIN failed--compilation aborted at t/integer.t line 30.
t/inte

help with HTTP::Request for POST

2003-02-18 Thread Scott Lutz
This is a vary slightly modified version of the example in the docs, and yet it 
returns no more data than this in my log : 
[Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature end of script 
headers: /var/cgi-bin/parse.cgi

Any help with what might be missing would be great
Here is the script:

#!/usr/bin/perl -wT

use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
my $ua = LWP::UserAgent->new;

if ($q->param("domain") =~ /\.ca$/) {
$ua->request(POST 'https://domains/perl/ca_reg.cgi', [
domain => $q->param("domain"),
affiliate_id => $q->param("affiliate_id"),
action => $q->param("lookup"),
]);
} else {
$ua->request(POST 'https://domains/perl/reg_system.cgi', [
domain => $q->param("domain"),
affiliate_id => $q->param("affiliate_id"),
action => $q->param("lookup"),
]);
}

Please do not hesitate to contact me directly if you have any more questions!

Cheers,

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.pacificonline.com

* Manage Your Account Online !
Pacific Online Control Panel http://www.pacificonline.com/customer_support 

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




RE: help with HTTP::Request for POST

2003-02-18 Thread Scott Lutz
I think I am going to move this over to the CGI list!

:o)

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.pacificonline.com

-Original Message-
From: Scott Lutz 
Sent: February 17, 2003 4:58 PM
To: [EMAIL PROTECTED]
Subject: help with HTTP::Request for POST


This is a vary slightly modified version of the example in the docs, and yet it 
returns no more data than this in my log : 
[Mon Feb 17 17:04:05 2003] [error] [client 66.51.160.131] Premature end of script 
headers: /var/cgi-bin/parse.cgi

Any help with what might be missing would be great
Here is the script:

#!/usr/bin/perl -wT

use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
my $ua = LWP::UserAgent->new;

if ($q->param("domain") =~ /\.ca$/) {
$ua->request(POST 'https://domains/perl/ca_reg.cgi', [
domain => $q->param("domain"),
affiliate_id => $q->param("affiliate_id"),
action => $q->param("lookup"),
]);
} else {
$ua->request(POST 'https://domains/perl/reg_system.cgi', [
domain => $q->param("domain"),
affiliate_id => $q->param("affiliate_id"),
action => $q->param("lookup"),
]);
}

Please do not hesitate to contact me directly if you have any more questions!

Cheers,

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.pacificonline.com

* Manage Your Account Online !
Pacific Online Control Panel http://www.pacificonline.com/customer_support 

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


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




Gurus Wanted!!

2001-06-07 Thread scott lutz

I have a this fancy bit of recursive search and replace code that I picked 
up somewhere, but I would greatly appreciate it if one of the gurus could 
explain it in English for me:

find . -type f -print0 | xargs -0 perl -pi -e 's/<>/<>/g'



Scott Lutz

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




CWD module

2001-06-08 Thread scott lutz

I am trying to get some info on CWD.pm.  Everywhere I look it seems to say 
that it is part of the Perl distro, yet when I try a perldoc cwd or perldoc 
getcwd it gives me :
No documentation found for "cwd".
or
No documentation found for "getcwd".

and when I try to run my script I get :
Can't locate CWD.pm in @INC

any suggestions?

thanks

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: CWD module

2001-06-08 Thread scott lutz

Nice!

Thanks <>
heh heh


Original Message Follows
From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: CWD module
Date: Fri, 8 Jun 2001 17:04:37 -0400 (EDT)
MIME-Version: 1.0
Received: from [209.85.157.220] by hotmail.com (3.2) with ESMTP id 
MHotMailBCEA88F000414004315FD1559DDC0DB10; Fri Jun 08 14:04:48 2001
Received: (qmail 76609 invoked by uid 1005); 8 Jun 2001 21:04:43 -
Received: (qmail 76594 invoked from network); 8 Jun 2001 21:04:43 -
Received: from crusoe.crusoe.net (206.136.64.10)  by onion.valueclick.com 
with SMTP; 8 Jun 2001 21:04:43 -
Received: from ns2.crusoe.net ([206.136.64.4]) by crusoe.crusoe.net  
(Post.Office MTA v3.5.3 release 223 ID# 0-52487U2500L250S0V35)  with 
ESMTP id net; Fri, 8 Jun 2001 17:04:38 -0400
>From beginners-return-3389-scott_lutz Fri Jun 08 14:04:55 2001
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Post: <mailto:[EMAIL PROTECTED]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
Delivered-To: mailing list [EMAIL PROTECTED]
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
X-Spam-Rating: onion.valueclick.com 1.6.2 0/1000/N

On Jun 8, scott lutz said:

 >I am trying to get some info on CWD.pm.  Everywhere I look it seems to say
 >that it is part of the Perl distro, yet when I try a perldoc cwd or 
perldoc
 >getcwd it gives me :
 >No documentation found for "cwd".
 >or
 >No documentation found for "getcwd".
 >
 >and when I try to run my script I get :
 >Can't locate CWD.pm in @INC

Because the module is Cwd.pm, not CWD.pm.

--
Jeff "japhy" Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk?  http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
**  Manning Publications, Co, is publishing my Perl Regex book  **


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Matching one array against another

2001-06-08 Thread scott lutz

I have a question that to me seems like it would be part of the foundation 
of Perl.

@possible_matches = qw( list of items to match against  );


@list = qw( imagine that there is an unknown
number of elements in here  );

foreach $list (@list) {
# now match againt each value in @possible_matches, one-by-one,
}

Is this not possible?
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Installed Modules

2001-06-13 Thread scott lutz

Is there a command to list all installed modules?
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: PPM

2001-06-21 Thread scott lutz

just type ppm from the comand prompt

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Sending Mail with attachments

2001-07-13 Thread scott lutz

I am trying to send an email, ( which works), with an attachement (which was 
a blank file, but is now nothing).  I have previous versions of this code, 
but this is the latest below.  I was trying to use the Mail::Sender mod, but 
it gave me the blank file.  Does anyone have any assistance or links to a 
good tutorial on this??

thanks!

## CODE SNIPPET BELOW

my $mailBody .=<<"EOF";
--=_NextPart_000_01BC7D88.04547780
Content-Type: application/octet-stream; name=\"$datestamp-payables.csv\"
Content-Transfer-Encoding: quoted-printable
Content-Description: sh_conf (CSV File)
Content-Disposition: attachment; filename=\"$datestamp-payables.csv\"

EOF

open (FIN, "$datestamp-payables.csv");
while ()
{
my $mailBody .=$_
};
close FIN;
$mailBody .=<<"EOF";
--=_NextPart_000_01BC7D88.04547780--
EOF

open (MAIL, "|/usr/sbin/sendmail -t -oi") || die "Can't fork for 
sendmail:$!\n";
print MAIL <
To: 
Subject: Daily Order Conversion script

X-MSMail-Priority: Normal
X-Priority: 1
X-Mailer: scott lutz\'s massive mailer
MIME-Version: 1.0
Content-Type: multipart/mixed; 
boundary="=_NextPart_000_01BC7D88.04547780"
Content-Transfer-Encoding: 7bit

This is a multi-part message in MIME format.

--=_NextPart_000_01BC7D88.04547780
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Orders to comma-separated-value file

$mailbody
EOF
close(MAIL) || warn "sendmail didn't close nicely\n";
print "Mail message sent\n";

# END CODE
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




RE: Sending Mail with attachments

2001-07-14 Thread scott lutz

Sweet.  I will try that out!

Thanks for the help.
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




Mac-to-*nix converter

2001-10-04 Thread Scott Lutz

Does anyone know of a reliable converter to convert Mac format files to =
a *nix type?
This would be a life saver!



-- scott lutz -- 





connecting to MS Access

2001-10-28 Thread Scott Lutz

I am wondering what the best way to connect to a MS Access database table to extract 
email addresses is?
DBI or is the some variety of Perl::ODBC?

Thanks!


--- scott lutz ---






Re: Flat File

2001-10-28 Thread Scott Lutz

($city,$name,$phone,$zip) = (s/\|/, $variable_representing_each_entry )

print "City=$city\n";




- Original Message - 
From: "Joe Echavarria" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 28, 2001 4:02 PM
Subject: Flat File


> Hi there,
> 
>I have a flat file with the follwoing structure :
> 
>   city|name|phone|zip.
> 
>The script save each row with "\n" at the end.
> 
>   If for example i wish to display all rows of the
> cities in Miami. That is city=Miami.
>   How can i do it ?
>   I have been trying regular expresions, but has not
> result yet.
>   Any ideas ?
> 
>   Thanks.
> 
>Joe.
> 
> 
>   
> 
> __
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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




Character Types

2002-04-17 Thread Scott Lutz

I am trying to do a split on a string with what looks like square boxes
separating the data.
Is this a tab?
I was trying to find an ASCII value for this to split on it, but can't
find one.
Any ideas?

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


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




map() definition help

2002-05-03 Thread Scott Lutz

What is the purpose of the following code?

@list = keys %{{map{$_,1} @list}};

I am looking over someone else's code, and I am not familiar with the map()
function.
I have looked through the perl docs on www.perldoc.com, but it doesn't quite
get this deep.

Any help would be great.



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




Different ways of declaring variables

2002-05-13 Thread Scott Lutz

I am wondering about the different ways of initializing a single scalar.

usual method:
my $variable;

but I am trying to get what (if anything) is being done differently by
this :
my ($variable);

Thanks!


Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


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




Net::SMTP and Bcc Usage

2001-05-31 Thread scott lutz

I have looked through all of the doc and even searched CPAN, but can find no 
reference to using the Bcc feature.

# Send the header.
$smtp->datasend("To: test <$address_1>\n");
$smtp->datasend("Bcc: test2 <$address_2>\n");
$smtp->datasend("From: $myname <$myemail>\n");
$smtp->datasend("\n");

I am using this on a Win32 machine also using 'use strict;'.
Any help ??
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Perl file creation

2001-10-30 Thread Scott Lutz

I have a Perl script that is creating files. The only problem is that they are being 
created with the wrong username:group.
Any idea as to why this is happening, and an easy way to fix it?


--- scott lutz ---






Re: Perl file creation

2001-10-30 Thread Scott Lutz

I have no choice. I run it from a web browser, so it takes the www:www
permissions that the machine gives it.


- Original Message -
From: "_brian_d_foy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 30, 2001 1:06 PM
Subject: Re: Perl file creation


> In article <007101c1617a$9fd47590$58644c18@windomain>,
> [EMAIL PROTECTED] (Scott Lutz) wrote:
>
> > I have a Perl script that is creating files. The only problem is that
> > they are being created with the wrong username:group. Any idea as to
> > why this is happening, and an easy way to fix it?
>
> do you run the script under the username and group that you wish the
> file to have?
> --
> brian d foy <[EMAIL PROTECTED]> - Perl services for hire
> CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
> Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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




Re: TEMPLETE

2001-11-04 Thread Scott Lutz

asign headers and footers:
$pageheader = "/path/to/some/directory/pageheader.txt";
$pagefooter = "/path/to/some/directory/pagefooter.txt";



&header;
put a bunch of Perl code here to spit out some fancy bits
&footer;

sub header {

 open (FILE,"$pageheader"); 
   @pageheaderfile = ;
  close(FILE);

 print "Content-Type: text/html\n\n";

 foreach $hline (@pageheaderfile) {
  print "$hline";
   }
}

##

sub footer {
 
 open (FILE,"$pagefooter");
   @pagefooterfile = ;
  close(FILE);

 foreach $fline (@pagefooterfile) {
  print "$fline";
 }
}





- Original Message - 
From: "nafiseh saberi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 03, 2001 11:45 PM
Subject: TEMPLETE


hi...
do u know how can I use templete in perl ??
(now I use html in perl source...)
thx.
  _
  Best regards

  Try to always be hopefull

   www.iraninfocenter.net
www.electronegar.com
  www.sorna.net  
   



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




output into a csv file

2001-12-17 Thread Scott Lutz

here is a snip of code that opens a .csv file, massages some of the data
a  bit, and then writes it back to a new .csv file.
The problem is that I can't figure a quick way to print out with commas
where they should be.
Some suggestions would be great!

__snip__

foreach $line (@data) {
chomp;
my @string = split(/,/, $line);
if (@string[0,1] eq "" ) {
next;
} else {
$copy_data = $string[0];
$string[34] = $copy_data;
push (@output, "@string");
print "Line $count parsed with FIRST -> $string[0] and
LAST -> $string[34]\n";
    }
    $count++;
}

__end_snip__


Scott Lutz
technical support
Pacific Online
http://www.paconline.net



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




RE: How can I send an HTML format email using send mail

2001-12-17 Thread Scott Lutz

You have to make sure to include the appropriate content type.

open (MAIL, "|/usr/sbin/sendmail -t -oi") || die "Can't fork for
sendmail:$!\n";
print MAIL 

RE: output into a csv file

2001-12-17 Thread Scott Lutz

I was looking for more of a way to print out the array, with inserting a
comma (,) between every array value, like 
while ( @output ) { 
print $output[position] .","
}

or something like that, 
I just figure that there would be an easy way to do it.

Scott Lutz
technical support
Pacific Online
http://www.paconline.net



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: December 17, 2001 1:35 PM
To: Scott Lutz; [EMAIL PROTECTED]
Subject: RE: output into a csv file


Scott,

I've found the AnyData module (search CPAN for AnyData) to be great for
CSV.
It can read and write CSV or XML, either tied to hash variables or
through a
DBI interface, as well as reading and writing to HTML tables. I've
noticed
that it uses the following rules for CSV:

  * If field to write contains no internal commas, write to file without
surrounding quotes.
  * If string contains commas, surround field with double-quotes.
  * If string contains both commas and double-quotes, surround with
double-quotes and indicate literal double-quotes as two quotes in a row.

For example, a row consisting of these string values:

  Here's a value
  One with "quotes"
  Another, with a comma
  Another, w/commas, and "quotes"

would be written (on one line) as

  Here's a value,One with "quotes","Another, with a comma","Another,
w/commas, and ""quotes"""

Make sense? Couldn't tell you what the code looks like for parsing.

- John

-Original Message-
From: Scott Lutz [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 3:05 PM
To: Beginners (E-mail)
Subject: output into a csv file


here is a snip of code that opens a .csv file, massages some of the data
a  bit, and then writes it back to a new .csv file.
The problem is that I can't figure a quick way to print out with commas
where they should be.
Some suggestions would be great!

__snip__

foreach $line (@data) {
chomp;
my @string = split(/,/, $line);
if (@string[0,1] eq "" ) {
next;
} else {
$copy_data = $string[0];
$string[34] = $copy_data;
push (@output, "@string");
    print "Line $count parsed with FIRST -> $string[0] and
LAST -> $string[34]\n";
}
$count++;
}

__end_snip__


Scott Lutz
technical support
Pacific Online
http://www.paconline.net



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message may contain information which is private, privileged or
confidential and is intended solely for the use of the individual or
entity
named in the message. If you are not the intended recipient of this
message,
please notify the sender thereof and destroy / delete the message.
Neither
the sender nor Sappi Limited (including its subsidiaries and associated
companies) shall incur any liability resulting directly or indirectly
from
accessing any of the attached files which may contain a virus or the
like. 

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




RE: the smtp program

2001-12-19 Thread Scott Lutz

Here is a great place to find info an almost every module known to
(Perl) man :
http://www.perldoc.com

Scott Lutz
technical support
Pacific Online
http://www.paconline.net



-Original Message-
From: Naeemah Small [mailto:[EMAIL PROTECTED]]
Sent: December 19, 2001 11:29 AM
To: [EMAIL PROTECTED]
Subject: the smtp program 


Does any know the  smtp program

how to send email over internet through smtp


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


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




Win32 disk usage

2001-12-21 Thread Scott Lutz

below is a snip of a script that is to monitor disk usage, and I want to
format the output in a fashion
like this : 

___usage_in_bytes___\t___directory_name___

the problem being that I can't find out what the formatting characters
mean in any of my books here.
Can anyone explain them ??

Thanks!

snip 

foreach $directory (@dirs) {
$count++;
if (($directory eq ".")||($directory eq "..")) {next;}
print(".");
$command="diruse " . $dir . "\\" . $directory . " /m /q:100 /l
/d"; 
$output=`$command`;
print FILE $output;
}

---

Scott Lutz
technical support
Pacific Online
http://www.paconline.net



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




executing system call

2001-12-21 Thread Scott Lutz

I am trying to get the date to create a file named after the current
date. 
( running under win32 )

here is the code : 
my $datestamp=`date`;
print "File name created : $datestamp\n";

gives me no output.

any ideas??

Scott Lutz
technical support
Pacific Online
http://www.paconline.net



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




RE: Win32 Process's

2001-12-27 Thread Scott Lutz

I picked up the book "Perl for System Administration", and it describes
these type of projects to a "T".
It is a great book, and it covers cross-platform, which is nice.

Scott Lutz
technical support
Pacific Online
http://www.paconline.net



-Original Message-
From: Matthew Mackey [mailto:[EMAIL PROTECTED]]
Sent: December 19, 2001 7:28 AM
To: [EMAIL PROTECTED]
Subject: Win32 Process's


Hi,
  I was looking for a way to list all of the current processes in a
Win2k Server with Terminal Services. I need to sort out the processes by
username, PID, and process then kill certain ones. Is this feasible?
  Thanks for your help
  Matt

Matt Mackey
Health Business Systems Inc.
(215) 442-9300 x9252



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


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




RE: how to get and setup Perl

2002-01-02 Thread Scott Lutz

There are Perl development GUI's available, ( I saw one, once in
passing, way back ), but mostly development is done with a text editor.
You can go to www.activestate.com and get VisualPerl if you so wish.

Once you get past the initial first script, a simple 
%perl program_name.pl
or
%./program_name.pl

will execute it.

:O)



Scott Lutz
technical support
Pacific Online
http://www.paconline.net



-Original Message-
From: Edwin Davidson [mailto:[EMAIL PROTECTED]]
Sent: January 2, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: how to get and setup Perl


Guys:

This is a VERY basic question.  I'm in the process of getting Redhat 7.2
Linux which had Perl bundled with it.  After I get Linux setup, how do I
'use' Perl ?  I'll explain.

When I install Visual Basic I hit a shortcut and in I go.  I can create
apps with the project manager as I'm sure you're all familiar with.
Same
with Visual C++.

But what about Perl ?  It doesn't come with with a GUI front end to
develope with.  And let's say you're written a Perl script - how exactly
do you test it ?  Does it have to run on something like Personal Web
Server ? 

It's one thing to go to the local library and get a Perl book out but
how
do you 'run' it ?  

And is there a monthly Perl magazine out there anywhere to be had ?

Thanks you.

Edwin



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


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




RE: More formatting questions

2002-01-04 Thread Scott Lutz

$dotdate =~ s/\.//;
$dashdate =~ s/-//;

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net



-Original Message-
From: Scott [mailto:[EMAIL PROTECTED]]
Sent: January 4, 2002 11:49 AM
To: [EMAIL PROTECTED]
Subject: More formatting questions


First off, thank you to everyone who has helped me dive into perl full 
force this week.  I am glad I am getting to know the language!

My question is about formatting.  I need to strip a decimal out of a 
number and dash out of a date.  I am importing a file and then 
reformatting it for export to a mainframe.  The number's come in like 
this:  100.05, I need to strip out the decimal from that and just
display 
10005.  With dates they are coming in 2002-01-03, here I need to just 
display 20020103.

Thanks in advance.

-Scott



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


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




formmail.pl security

2002-01-11 Thread Scott Lutz

I am curious if anyone is familiar with a way to tighten security on
this script?
We am experiencing some sort of script that is exploiting this code, and
am looking for some previous experience here . . 

please 

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


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




Greedy 'split' ???

2002-01-16 Thread Scott Lutz


$DOM_NAME, my $TLD) = split(/\./, $domain);
creates two variable out of an inputted domain name, 

until this comes along:
domainname.org.uk

which it interprets as : 
$DOM_NAME = domainname
$TLD = org

so is it possible to do a 'greedy split' ??


Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


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




dynamic array values

2002-01-29 Thread Scott Lutz

Here is the story:
"@array" with unknown number of elements, that I want to cycle through while
assigning variables to each value in the loop like this:

__snip__

foreach my $domain ( @DOMAINS_ORDERED ){
(my $DOM_NAME, my $TLD) = split(/\./, $domain, 2); #split the domain
into 2, so we can extract the "TLD"
$count++;
#$price_total = $price_total + $TLD_DEF{$TLD}; # old school
$price_total += $TLD_DEF{$TLD}; # new school :)
}

__end_snip__

But what I would like is this : if there are two or three elements in the
array then come out with $var1 $var2 $var3, which ever, but only declaring
them if they exist. I have looked over the camel and lama books but am not
exactly what I am looking for, "dynamic array variables"?

I am looking for some assistance here, and what to keep this as dynamic as
possible, and want to be able to refer to the variable contents later in the
script if need be ( this is the whole point of the matter ).

Thanks in advance to all!



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




RE: Using require()

2002-02-06 Thread Scott Lutz

if (a = true) {
require 'naveen.pl";
>>> note that the above line has mismatched quotes
    } else {

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net



-Original Message-
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: February 6, 2002 1:52 PM
To: [EMAIL PROTECTED]
Subject: Using require()


Does require() work only twice? I've tried multiple loops only to get
this 
to work a third time. After every time, however, it automatically exits.

Here's an example:

if (a = true) {
require 'naveen.pl";
} else {
print "You are not Naveen.\n";
exit;

As long as a = true, it should call 'naveen.pl', correct? Any ideas?

TIA,
- NP




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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


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




.dat files

2002-02-06 Thread Scott Lutz

Does anyone have any ideas or suggestions to actually
reading/modifying/making the infamous .dat files that are spread all over
the Win32 file system?

I would like to see what is in them, and maybe edit if I choose, and wonder
if there is a module out there for doing this?

Anyone?

(and thanks in advance)



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




RE: .dat files

2002-02-07 Thread Scott Lutz

The file(s) I really wanted to look into is the index.dat that contains all
cookie information, and browser session info.
I am going to try a hex editor to see what I can see.

Thanks!



-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 3:51 Morning
To: Beginners Perl
Subject: RE: .dat files


> From: Scott Lutz [mailto:[EMAIL PROTECTED]]
>
> Does anyone have any ideas or suggestions to actually
> reading/modifying/making the infamous .dat files that are spread all
> over the Win32 file system?
>
> I would like to see what is in them, and maybe edit if I choose, and
> wonder if there is a module out there for doing this?
>
> Anyone?

This really depends on what .dat files you mean.

1) You might want to get a hexa editor and see what's inside. Not
that they are likely to be human readable, but most files start with
some kind of header. Eg. .EXE usualy starts with "MZ", in Word
documents you'll find something like (this time in hexa)
D0 CF 11 E0 A1 B1 A1 E1
then some zeroes with a few nonzero bytes scattered around and
then a few lines of FF.

2) .dat is a bit strange extension. it's used by the system to store
parts of the registry, but also by many different programs to store
ANY data. And the internal format of course differs.

If you mean those USER.dat, SYSTEM.dat (Win9x) and
NTUSER.dat, SOFTWARE, DEFAULT, SAM, SYSTEM
(WinNT/2k) then you may use either Win32::TieRegistry or
Win32::Registry.

You may need to load the file you want to edit if it's not loaded
already (say if you want to change something in
NTUSER.dat/HKEY_CURRENT_USER for all users). I believe
TieRegistry contains a function for this, for Win32::Registry you will
want to download the Win32::Registry2 patch from
http://Jenda.Krynicky.cz

Jenda

=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me

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




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




accessing CGI.pm params directly

2002-02-07 Thread Scott Lutz

I want to access parameters right out of the query_string with out
having to declare them into distinct variables first, but always come up
with hash reference errors.

This is what I tried : 
print qq{\n};

and get this output :


Can anyone lend a learning hand here as to what I am doing wrong???


Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


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




Friday afternoon help!

2002-02-08 Thread Scott Lutz

Why is it that you have to "\" out the @ symbol in the regex below?

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

opendir(TEMP_DIR, "/home/slutz/temp");
my @items = grep(/\.BAD/,readdir(TEMP_DIR));
closedir(TEMP_DIR);

my ($file, $line);

foreach $file (@items) {
print "Going into file : $file\n";
open(FIN, $file) || warn "cant open the damn file : $!";
foreach $line ($file){
if ( $line =~ [EMAIL PROTECTED]/i ) {
rename "$file", "bad_email/$file" || die "$!";
print "moved file $file to bad_email/$file\n";
}
}
close(FIN);
}

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




Convert to a one liner

2002-02-08 Thread Scott Lutz

This should be a weekly thing :
See who can send in the most useful Perl one liner!

So to start it off, I would like some suggestions on some "not so
cryptic" one liner methods to do the following :

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

opendir(TEMP_DIR, "/home/slutz/temp");
my @items = grep(/\.BAD/,readdir(TEMP_DIR));
closedir(TEMP_DIR);

my ($file, $line);

foreach $file (@items) {
print "Going into file : $file\n";
open(FIN, $file) || warn "cant open the damn file : $!";
while ( $line =  ){
if ( $line =~ m'[EMAIL PROTECTED]' ) {
rename "/home/slutz/temp/$file",
"/home/slutz/temp/bad_email/$file" || die "$!";
print "moved file /home/slutz/temp/$file to
/home/slutz/temp/bad_email/$file\n";
}
}
close(FIN);
}


Thanks in advance!


Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


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




RE: Will not Work on the Server.

2002-02-13 Thread Scott Lutz

(I am going to guess that you are trying to access this through a web
browser? If not then forgive me!)
You need to include :
print "Content-type: text/html\n\n";

before you attempt to print it out.

Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net



-Original Message-
From: Anthony LaBerge [mailto:[EMAIL PROTECTED]]
Sent: February 13, 2002 6:54 AM
To: [EMAIL PROTECTED]
Subject: Will not Work on the Server.



I'm having a little trouble getting this simple test file to run on a 
server.

printer.pl

1~ #!/usr/bin/perl
2~ 
3~ $postfile = 'posts.fil';
4~ open(INFO, "<$postfile" );
5~ @PostLines =  ;
6~ close(INFO) ;
7~ print "Post Tester\n";
8~ print "\n";
9~ foreach $line (@PostLines)
10~ {
11~ print " $line ";
12~ }
13~ print "\n";

and the posts.fil

1~ This is a test document. I'm just testing,
2~ and i'll even throw in a " .
3~ lets see if that works.

When I run it through the comand line (typing 'printer.pl')
it puts out:
1~ Post Tester
2~ 
3~ This is a test document. I'm just testing,
4~ and i'll even throw in a " .
6~ lets see if that works.
7~ 
When I put it on the server (in ascii mode) it does not work, and gives 
me an error, I made sure the command line is right, and even added the -
- like the error asks, but it does not work either way. What's wrong?

here's a link to the file as it is on the server.
http://www.labant.net/printer.pl


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


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




perldoc manual

2002-02-20 Thread Scott Lutz

Where can one find a good reference to the perldocs?
I want to find out about "push", so I tried :

perldoc list -> No documentation found for "push".
perldoc array -> No documentation found for "array".
perldoc list -> No documentation found for "list".



Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net


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




RE: over-writing a file

2002-03-08 Thread Scott Lutz

Re : perldoc -q "I just want to increment the number in the file"

How does one find (out about) these obscure perldoc functions?
My word!


Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.paconline.net



-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]]
Sent: March 8, 2002 6:08 AM
To: [EMAIL PROTECTED]
Subject: Re: over-writing a file


Ken Cole wrote:
> 
> Hi,

Hello,

> I have a file with say the value "02" in it.
> 
> I can open the file, lock the file, read the value, increment the
value
> and do a write but the write always appends and never over-writes the
> exisitng value.  I of course then unlock and close.
> 
> I do a seek before the write to the beginning of the file, even
checked
> with "tell" and it returns "0",but the following print or syswrite
> always appends.
> 
> Why?  How do I over-write?


perldoc -q "I just want to increment the number in the file"


John
-- 
use Perl;
program
fulfillment

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


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