Scott R. Godin wrote:
snip
any pointers? I'm happy to toddle off and download and read my face off
-- that's not a problem.. I'd just like to have some indication on which
direction to start walking. :-)
Here are some Pictures Gallery-type modules that can be found on CPAN:
Apache::Album:
This may be a little off topic, but I hope someone can help me.
I set up this cgi file and html form on a Unix server. All functions of
the form and file worked correctly
on a Unix Server. However, I need to move these files to an IIS server.
In testing on the IIS server, I get an HTTP Error
I'm trying to write a little piece of middleware to allow one of our
developers to use Flash to pull up a webpage that lists the current jobs in
a print queue in Windows NT. I found this very nice little script called
NTPStat.pl at http://www.roth.net/perl/scripts/scripts.asp?NTPStat.pl and
This isn't PERL, but you could use regedt32.exe to set permissions for
that user on the registry key. I don't see any problems with giving
that user read permissions on that key. They don't need to delete
things from the print queue do they?
-_-Aaron
-Original Message-
From: Kip
I think you'll need to look at the image magik module for creating the
thumbnails. I've looked at this in the past, and come away with headaches,
but I believe it's the right tool for the job. Good luck
John
-Original Message-
From: Scott R. Godin [mailto:[EMAIL PROTECTED]]
Sent: 16
I hope someone can help me out.
I set up this cgi file and html form on a Unix server. The script
changes a user's password in a text file.
This works correctly on a Unix Server. However, I need to move these
files to an IIS server.
In testing on the IIS server, I get an HTTP Error 405-
I need to touch a file with a 1 in it if a condition is true, and
either toggle the 1 to a 0 or delete the file (whichever is better,
probably toggle) if another condition is true. Excuse my
newbie-ness...but can anyone give me some hints as to the correct syntax
for that?
thanks,
rory
--
Hi Rory,
Assuming that if there is a problem in opening the file then it's 0, I
hope the following code helps.
#Code Begings
if (open (INFILE, file.txt)) {
$flag = INFILE;
close (INFILE);
} else {
$flag = 0;
}
if ($flag == 0) {
$flag = 1;
} else {
$flag = 0;
}
open
hi
im wondering how i can make a subroutine that will return all text lines between
certain marks such as START and STOP:
text file:
START
text
is here
and there
is
a
lot of it
STOP
so i would like to call the subroutine with the arguments START and STOP (because i
may need more starts and
Martin A. Hansen wrote:
im wondering how i can make a subroutine that will return all text
lines between certain marks such as START and STOP:
Here's simple way to do it. It uses the '..' operator (see perldoc
perlop for more info about it).
Note that if START and STOP are in the same line,
Here's a fairly simple little script to list directories and files recursively.
Couple questions:
-- Is it fairly simple to make it list everything in a properly indented
heirarchy? (Somewhat similar to what windows explorer would look like if every
level were expanded).
-- In the sub, how can
-Message d'origine-
De : mb [EMAIL PROTECTED]
À : [EMAIL PROTECTED] [EMAIL PROTECTED]
Date : mercredi 16 janvier 2002 09:47
Objet : créating DSN system
Hi,
I'm trying to drive gestion commerial 100 data bases using ODBC 100 and do not
found
parameters (in any sage doc) to type on the
Gary Hawkins wrote:
Here's a fairly simple little script to list directories and files recursively.
Couple questions:
-- Is it fairly simple to make it list everything in a properly indented
heirarchy? (Somewhat similar to what windows explorer would look like if every
level were
im wondering how i can make a subroutine that will return all text
lines between certain marks such as START and STOP:
text file:
START
text
is here
and there
is
a
lot of it
STOP
so i would like to call the subroutine with the arguments START and
STOP (because i may need more
Read through 'preprocess' subsection of the File::Find docs
(perldoc File::Find).
This might be of help to you.
I already read the fantastic manual and was hoping for something that conveys
understanding.
preprocess
The value should be a code reference. This code reference
Rory Oconnor wrote:
I need to touch a file with a 1 in it if a condition is true, and
either toggle the 1 to a 0 or delete the file (whichever is better,
probably toggle) if another condition is true. Excuse my
newbie-ness...but can anyone give me some hints as to the correct syntax
for
Gary Hawkins wrote:
Read through 'preprocess' subsection of the File::Find docs
(perldoc File::Find).
This might be of help to you.
I already read the fantastic manual and was hoping for something that conveys
understanding.
preprocess
The value should be a code
hi dear team.
hope you be fine.
I dorp one important table in postgres:(
how can I recover it ??
thx for your favour.
thx for your time.
_
Have a nice day
Sincerely yours Nafiseh Saberi
The amount of beauty required to
launch one ship.
Hello All
Can anybody tell me where from I can down load 'Win32::ActAcc'. I tried it
from CPAN but failed.
Thanks
Abhra
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Abhra Debroy wrote:
Can anybody tell me where from I can down load 'Win32::ActAcc'. I tried it
from CPAN but failed.
Get the .zip here:
http://cpan.valueclick.com/authors/id/P/PB/PBWOLF/Win32-ActAcc-0.5.zip
then:
1 Unzip the zip (Win32-ActAcc-n.n.zip). Make sure your unzip program
preserved
depending on the locale!
- Original Message -
From: Hanson, Robert [EMAIL PROTECTED]
To: 'Naveen Parmar' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 7:16 PM
Subject: RE: gt
Yes, but it is greater than in a character code sense. So b (ASCII
98)
is
From: Edson Alvarenga (EDB) [EMAIL PROTECTED]
I've almost deleted the mail without reading. Please include what module
do you have problems with in the subject!
I'm writing a script file in order to get the print queues, but
when I call the function EnumJobsA at the first time in order to
I dorp one important table in postgres:(
how can I recover it ??
thx for your favour.
thx for your time.
Uh, oh... you're probably out of luck. Unless you have a backup of the
data or the original SQL you used to create the table, you won't be able
to recover your table.
BTW, you might
Hello all.
I want to be able to take the file name in as an argument of the function,
for example:
%Extract.pl MyFile.txt
I know that I could use:
#!/usr/bin/perl
while () {
}
But how could I take two arguments from the command line:
i.e. my guess:
%Test.pl Foo Bar
#/!/usr/bin/perl
$A =
I'm trying to use the following, in order to be able to print the
names of sub-directories within a directory:
1 $folder = /home/cwarnock/public_html/staged/DEVELOPMENT/;
2
3 opendir(DEV, $folder);
4
5 @all_files = readdir(DEV);
6
7 foreach $Name (@all_files) {
8
Unless $folder is the current directory, you will either need to prepend it
to the name of the directory you are checking or cd to that directory.
i.e.
foreach $Name (@all_files) {
print $Name;
if( -d $folder/$Name ) {
print $Name;
}
}
- Original Message -
From: Caroline
From: Caroline Warnock [EMAIL PROTECTED]
I'm trying to use the following, in order to be able to print the
names of sub-directories within a directory:
1 $folder = /home/cwarnock/public_html/staged/DEVELOPMENT/;
2
3 opendir(DEV, $folder);
4
5 @all_files =
But how could I take two arguments from the command line:
i.e. my guess:
%Test.pl Foo Bar
#/!/usr/bin/perl
$A = $ARGV[0];
$B = $ARGV[1];
print Thing A: $A Thing B: $B;
I think you already answered your own question! Though your shebang
line should be #!/usr/bin/perl.
sub GetUser
{
my ($id, $user)=@_; # record number and hash reference to
populate
if (defined($UserCache[$id])) {
$user = $UserCache[$id];
return(1);
I'll have to keep this in mind. I don't think it applies here since my
return value is either a 0 or a 1 (no records read or valid data found). I
fill in the hash reference from the database data.
It never hurts to learn about a new module!
--Chuck
-Original Message-
From: Frank
Abhra DebroyIn wrote:
Win32::ActAcc
Available at:
http://uiarchive.uiuc.edu/mirrors/ftp/cpan.cse.msu.edu/modules/by-category/22_
Microsoft_Windows_Modules/Win32/Win32-ActAcc-1.0.zip
Shaun
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I've got an idea kicking around in my head ..
having a web-directory that can have image files added to it, taken
away, or prefaced with . to have them be ignored temporarily without
removing them.
initial run of the .cgi indexes the directory into a local database
file, and creates
I think you'll need to look at the image magik module for creating the
thumbnails. I've looked at this in the past, and come away with headaches,
but I believe it's the right tool for the job. Good luck
John
-Original Message-
From: Scott R. Godin [mailto:[EMAIL PROTECTED]]
Sent: 16
I suggest using Image::Magick for generating thumnails. It is painless to
do and the resulting files are of good quality. Here is a code snippet:
use Image::Magick;
my $im = new Image::Magick();
$im-Read($inputfile);
$im-Resize( geometry = 200x200 );
$im-Write($outputfile);
undef $im;
I
Hi,
For anything more complex than a simple script you should
consider using switches and parameters.
You know, something like this [highly dangerous] dd
command:
dd if=/dev/zero of=/dev/hda7 count=1 bs=512
Or:
tar -zxvf archive.tar.gz
Processing these can be quite hard, but guess what...
Wednesday, January 16, 2002, 10:24:27 AM, Scott R. Godin wrote:
I've got an idea kicking around in my head ..
having a web-directory that can have image files added to it, taken
away, or prefaced with . to have them be ignored temporarily without
removing them.
[snip]
any pointers?
I need someone to tell me the function that will convert time in this
format to epoch time: 1/17/2002 11:15 AM
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I didn't think I needed the \s+ because in the perlre man page it says
$ matches the end of the line before the last newline.
Anyway, that did work so I wanted to thank you.
Sheridan
- Original Message -
From: Tanton Gibbs [EMAIL PROTECTED]
To: Lysander [EMAIL PROTECTED]; [EMAIL
On Jan 16, Roy Peters said:
I need someone to tell me the function that will convert time in this
format to epoch time: 1/17/2002 11:15 AM
If localtime() isn't good enough for you, then perhaps you'll want to use
the POSIX strftime() function, or you could hand-roll a solution.
my ($min,
You could also use the Date::Parse module, part of the TimeDate package...
use Date::Parse;
my $epoch = str2time('1/17/2002 11:15 AM');
Rob
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 12:57 PM
To: Roy Peters
Cc: [EMAIL
To convert *to* seconds since the epoch you want the timelocal() function.
It's part of the Time::Local standard module and takes input in the form of
localtime's output. From 'perldoc Time::Local'
use Time::Local;
$time = timelocal($sec,$min,$hours,$mday,$mon,$year);
so a
Hello,
I'm using a nice little GDBM file for authentication. It just stores users
and passwords as SHA1 hashes. When I need to authenticate someone (fewer
than 15 lines in the dbm file) I just tie it and compare the SHA'd user
input against the hex value in the dbm file. (The file is not publicly
Your choices are basically GD or Image-Magick I've had good experiences
with both. Image::Magick is more full featured but slower so if you're
doing anything on the fly you should use GD, but if its just a one pass
sort of thing (and I think that is what you're doing) then Image::Magick
is
Hello All,
Could somebody please help me figure out why the following code will
not write the IP address to a file?
I've verified that the code can find the file, open it overwrite any
junk/test data already there with nothing. I've also printed out the
IP address on the previous page using
It looks like you forgot to specify the file handle when printing.
print CHECK $ENV{'REMOTE_ADDR'}; }
Rob
-Original Message-
From: K.L. Hayes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 6:23 PM
To: [EMAIL PROTECTED]
Subject: Won't write IP address to file
Hello All,
Hello Robert,
Duh! Thanks! I knew it was something stupid/simple. I just couldn't
figure IT out AND be pulled in 20 other directions at the same time.
Sometimes another eye planted in the middle of my forehead would
really come in handy... *;) Thanks again for your time!
--
Best regards,
K.L.
Hi
Ý am a very beginner in Perl. Here is my problem:
I want to send some data on (via) established connection (telnet). I don't
need any code to establish connection, to login, etc. I just need to send
data (including \n at the end). How to do this?
What modules I have to use?
Sorry for
i am hoping to use perl to verify whether a remote machine is listening on
UDP/69. i've found some examples, and modified them slightly to come up
with the attached snippet of code. the output always seems to be that the
port is up. i am imagining that $disconn is never being set to true
You can't send data through an open Telnet session if that is what you are
thinking. (disclaimer: maybe you can, but good luck trying to do that).
What you want is to use the Net::Telnet module.
use Net::Telnet;
# Open a telnet session
my $t = new Net::Telnet (Timeout = 10);
$t-open(1.2.3.4);
Is there a way with Net::Telnet that I can read data and send data
simultaneously? Or how about capturing the data that comes in to a
variable?
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: Hanson, Robert [EMAIL PROTECTED]
To: 'Oktay Ahmed'
The following conditional expression tests whether the value of $number1 is
negative or greater than 12:
(($number1 1) || ($number1 12))
Shouldn't this test whether the number is 0, negative, or 12? Is this
unique to the way Perl uses numbers?
TIA,
- NP
All the module allows you to do is open up a telnet session and interact
with it. So yes, you can store the return value of a command into a
variable like this:
my $host = $t-cmd(String = 'hostname', Prompt = '/\$ $/')
I'm not sure what you mean by sending/read data at the sime time. I am
If really want negative then the 1 should be 0.
Wags ;)
-Original Message-
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 13:20
To: [EMAIL PROTECTED]
Subject: Conditional Expressions
The following conditional expression tests whether the value
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 4:01 PM
To: Perl Discuss
Subject: verifying if a server is listening on a port
i am hoping to use perl to verify whether a remote machine is
listening on
UDP/69. i've
Ok, thanks. But now you've made me curious about fork..
You can make the two processes of a fork talk to each other? How? I've
tried setting a variable in the child and printing in the parent, but that
didn't work.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
-
-Original Message-
From: Agustin Rivera [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 4:27 PM
To: Hanson, Robert; [EMAIL PROTECTED]
Subject: Re: SEND
Ok, thanks. But now you've made me curious about fork..
You can make the two processes of a fork talk to each
On Wed, 16 Jan 2002, David Ulevitch wrote:
I am trying to do this:
$ns1_in = `/usr/local/sbin/iptables -xvnL |grep 'mrtg' |grep -v 'Chain' |grep
'ns1-in' |awk '{print $2}'`;
but perl thinks the $2 is for it so it evals it (to '') and then awk
in return prints the whole line, as
In article [EMAIL PROTECTED], David Ulevitch wrote:
I am trying to do this:
$ns1_in = `/usr/local/sbin/iptables -xvnL |grep 'mrtg' |grep -v 'Chain' |grep
'ns1-in' |awk '{print $2}'`;
but perl thinks the $2 is for it so it evals it (to '') and then awk
in return prints the whole
so, i would need to use something like $checkport-send(); and get a
response from the tftp server to verify the port is listening correct?
thanks -c
On Wed, 16 Jan 2002, Bob Showalter wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday,
Hi All,
Does anyone know how to find ( in a PERL script running under Windows)
whether a process( program ) is already running or not. In Unix, I can
easily do this using the 'ps' command in backticks. I don't know how to do
this in Windows. Any thoughts?
Thanks,
sathish
--
To
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 4:49 PM
To: Bob Showalter
Cc: Perl Discuss
Subject: RE: verifying if a server is listening on a port
so, i would need to use something like $checkport-send(); and get a
Hello Robert,
After trying your advise it still didn't write to the file. Went had
some dinner... came back it was obvious... Took the while (CHECK)
statement out it worked like a charm.
Whomever says that your stomach brain aren't connected... is just
wrong... in my case anyway... ;)
Is there is a built in function in Perl for generating random access #s?
How would that function be used?
TIA,
- NP
_
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
To unsubscribe, e-mail: [EMAIL
Hanson, Robert wrote:
It's been a long time since I worked on IIS, but I believe the Method not
allowed error refers to GET, POST, PUT, and HEAD. In IIS you can
allow/deny each of these, but I forget exactly where in the MMC that this
was located, it was with the file types.
So maybe .cgi
Right. But since it's tftp, just try to put or get the file and
check to see if it worked. You should probably consider using the
Net::TFTP module from CPAN.
i'll looks into net::tftp. but i dont think the get/put will
give me what i need since i really want to use this as
David Ulevitch wrote:
I am trying to do this:
$ns1_in = `/usr/local/sbin/iptables -xvnL |grep 'mrtg' |grep -v 'Chain' |grep
'ns1-in' |awk '{print $2}'`;
but perl thinks the $2 is for it so it evals it (to '') and then awk
in return prints the whole line, as opposed to the $2 that
Hello John,
Just wanted to say Thank You for ripping my poor little code segment
apart the way you did. Some might be offended if you did it to them,
but not me... IT MAKES ME A BETTER PERL HACKER! :)
Thanks for opening my eyes to some of my stupid code enlightening
me to some new ways of
I am unable to use split with pattern matching to remove alpha characters
from a string and will appreciate a pointer on what I'm doing wrong. (Have
looked in Learning Perl and Programming Perl but can't spot my error.)
The detail:
$stat is a string that has alpha and numeric data in it.
I
$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
Could do something like:
@MyNbrs = map{ /(\d+)/g } $MyInp;
Small script:
my @MyNbrs = ();
while ( 1 ) {
printf Please enter string of data:\n;
chomp(my $MyInp = STDIN);
last if ( $MyInp =~ /^ex$/i );
@MyNbrs = map{ /(\d+)/g } $MyInp;
my $MyCnt = 1;
foreach (
On Thu, Jan 17, 2002 at 10:10:16AM +1000, Lorne Easton wrote:
Thanks for the advice. I looked at using HTML::LinkExtor but decided against
it.
Why would you do that? HTML is deceptively difficult to parse; given a
choice, an already mature parser is usually much preferable to a hand-rolled
On Wed, Jan 16, 2002 at 03:57:44PM -0800, Scott Lutz wrote:
$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
On Wed, Jan 16, 2002 at 05:38:56PM -0600, Hewlett Pickens wrote:
The detail:
$stat is a string that has alpha and numeric data in it.
I want to remove all of the alpha and put the numeric data into an array.
The first attempt:
my @nums = split(/a-zA-Z/,$stat); # removes all data
On Wed, 2002-01-16 at 07:15, Gary Hawkins wrote:
However the script continues
print @list3;
my $var1='META';
@lista= grep{$var1} @list3;## not picked up at all
print @lista
anyone any clues
Suppose I'm a little confused but perhaps you meant:
print @list3;
@lista=
On Thu, 2002-01-17 at 00:55, Michael Fowler wrote:
On Wed, Jan 16, 2002 at 03:57:44PM -0800, Scott Lutz wrote:
$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
On Wednesday 16 January 2002 11:45 am, [EMAIL PROTECTED] wrote:
Hello,
I'm using a nice little GDBM file for authentication. It just stores users
and passwords as SHA1 hashes. When I need to authenticate someone (fewer
than 15 lines in the dbm file) I just tie it and compare the SHA'd user
On Wednesday 16 January 2002 03:56 pm, rabs wrote:
I am new to regualr expressions and becoming accqainted with the =~
operator. It appears to me that the =~ allows me to match a pattern in a
REGEX against a variable. As such it replaces the $_ varible.
$name =~ /[rabs]/;
mtaches with a
Hewlett Pickens wrote:
I am unable to use split with pattern matching to remove alpha characters
from a string and will appreciate a pointer on what I'm doing wrong. (Have
looked in Learning Perl and Programming Perl but can't spot my error.)
The detail:
$stat is a string that has
On Wed, 16 Jan 2002, Scott Lutz wrote:
$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
Scott Lutz wrote:
$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'
Rabs wrote:
I am new to regualr expressions and becoming accqainted with the =~
operator. It appears to me that the =~ allows me to match a pattern in a
REGEX against a variable.
Yes.
As such it replaces the $_ varible.
No, a regular expression will not replace anything and does not
This is how I do it on a FreeBSD boxpath is different on linux etc,
but works the same and straight from the command line...dunno if it helps.
for a in *; do
/usr/ports/graphics/ImageMagick/work/ImageMagick-5.3.8/utilities/convert
-geometry 128x96! $a thn-$a; done
Cheers
P.
On Wed, 16 Jan
Hi Robert,
Right click on the servername and choose Properties.
Choose Home Directory and choose Configuration
under Application Settings.
You can edit your application mappings from the App
Mappings tab.
These should have been set up for you if you installed
perl after IIS, but you will need
- Original Message -
From: maureen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Currently, the array seems to only be picking up the last name listed in
the text file.
@indata = FILE;
close(FILE);
foreach $i (@indata)
{
#remove hard return character from each record
chomp($i);
84 matches
Mail list logo