- 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 = ;
> close(FILE);
> foreach $i (@indata)
> {
> #remove hard return character from each record
> chomp($i
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 w
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
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 no
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 'gre
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
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 stri
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 w
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 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
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;
>
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
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 = o
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
s
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 = );
last if ( $MyInp =~ /^ex$/i );
@MyNbrs = map{ /(\d+)/g } $MyInp;
my $MyCnt = 1;
foreach ( @MyNbrs )
Hi there,
Thanks for the advice. I looked at using HTML::LinkExtor but decided against
it.
I am using code like the following:
sub get_urls {
my @url_array;
my ($data) = @_;
print $data;
#Put all ")|gi) {
my $temp_tag = $1;
#Strip out tags
#Insert code here..
push @url_array,$temp_tag;
$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 Onlin
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
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 do
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 $
>
> 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 thi
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 ".
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 PROTEC
"K.L. Hayes" wrote:
>
> Hello All,
Hello,
> 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 t
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 ()
statement out & it worked like a charm.
Whomever says that your stomach & brain aren't connected... is just
wrong... in my case anyway... ;)
Posted
> -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
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 unsubscrib
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: Wedne
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 wh
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, a
In perl:
(($n < 1) || ($n > 12)) is true when n is less than 1 or if n is greater
than 12. Try this:
for my $n (-5..17){
if (($n < 1) || ($n > 12)) {
print "True for \$n = $n\n"
} else {
print "False for \$n = $n\n"
}
}
Double check your logic. Are you sure you're
> -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
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
- Origin
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" doesn't have GET access
Hello beginners,
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 I want.
> -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.
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 o
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
t
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
___
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 Ah
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")
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
sin
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 as
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.
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 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 ju
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
Ooo. I've never used this. It sure looks better than parsing the date out
yourself.
Peter C.
-Original Message-
From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 10:21 AM
To: Roy Peters
Cc: [EMAIL PROTECTED]
Subject: RE: time function
You could also us
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 comp
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 PROT
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, $h
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]>; <[EMAI
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]
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 pointe
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... th
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 be
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 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 Janu
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 thumbn
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 [
> >sub GetUser
> >{
> > my ($id, $user)=@_; # record number and hash reference to
> >populate
> >
> > if (defined($UserCache[$id])) {
> >$user = $UserCache[$id];
>
> >return(1);
>
>
>
>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 "
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 @a
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 War
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
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
> 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
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
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
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
preserve
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]
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.
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
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 syn
Hi everybody,
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 know what is the size that I need to
allocate for the buffer the function return the value 538976288 and when I try to
allocate this value in a buffer
> 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 refer
> 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
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 exp
-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
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 w
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,
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 s
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, ";
close (INFILE);
} else {
$flag = 0;
}
if ($flag == 0) {
$flag = 1;
} else {
$flag = 0;
}
open (OUTFILE, ">file.txt") || die;
pr
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
85 matches
Mail list logo