Question:
When you extract a value from an @ are you guarenteed the order that
you are going to get?
Example:
foreach $value (@some_array) {
#do something to $some_array[0]
#on the next pass through the foreach and the @some_array
#do something to $some_array[1]
#
Dear Team
I am getting the following error in starting a perl service which is created
by my script.
Error:
error 2186 :The service is not responding to the control function
Event Deatails:
Event ID:7009,
Source: Service Control Manager
Timeout (12 milliseconds) waiting for service to con
Hi,
I need to install and use the Storable.pm in my machine. I am useing Active
Perl on Win2k machine.
I have not done this before. Its urgent, kindly let me know the procedure
for same.
rajeev
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
yes, you can run it as a service:
apache -k install -n Apache
or simply run it in the background
apache -k start -n Apache
I think these should work.
Sid.
-Original Message-
From: Danny Reyna [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 9:58 PM
To: [EMAIL PROTECTED]
does anyone know how to hide the dos console that
pops up and doesnt leave when you run the apache
webserver..
any help would be appreciated!
Thanks
Danny
__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenge
Thanks for all of the help on the delimited text file. I have another
question. My form has several drop down lists/menus. The application that
I'm importing this into has 1 field number for each selection, but I can't
get the delimited file to flow properly.
Example
The pull down list is fo
Craig,
What does the form access?
Look in the HTML source, and in the form tag, there will be an action
attribute. You can access that normally. Say I have a form at form.html
on somedomain.com. That form takes a firstname variable. When it's
finished, it sends the information to formparser.pl
On Thu, 6 Sep 2001, Marcelo Aimeta wrote:
> I'm working my way through sams "Teach yourself perl in 21 days" and I'm stuck.
>
> This is the code that I'm having trouble with:
>
> #!/perl/bin/
>
> $wordcount = 0;
> $line = ;
> while ($line ne "")
> {
> chop ($line);
> @array = sp
I need to write a script to access a simple html form on a network
device and perform specific functions on the form to acquire
information.
Does anyone have a sample script they would like to share? I just need
to figure out how to access a web page and enter data into a form
automatically.
Tha
On Sep 6, Paul Jasa said:
>/((?:\d{1,3}\.){3}\d{1,3})/
>
>what is this part: (?:\d{1,3}\.)
>and this:{3}\d{1,3}
Ok. (?: ... ) groups part of the regex. It just binds it together as one
big clump.
The {3} is a quantifier, like {1,3}. {1,3} means "1, 2, or 3 times". {3}
means "exactly 3
> "+Brian" == +Brian d foy <[EMAIL PROTECTED]> writes:
+Brian> my @sorted = map { $_->[0] }
+Brian> sort { $a->[1] cmp $b->[1] }
+Brian> map { [ $_, substr($_, 2, 3) ] }
+Brian> @lines;
Except that the substr() function is likely not expensive enough
Thanks Jeff, that worked!!
one question, I am confused how you did that in this REg Exp:
/((?:\d{1,3}\.){3}\d{1,3})/
what is this part: (?:\d{1,3}\.)
and this:{3}\d{1,3}
I am lost jst want to understand, or if youwant to refer me to a page
on the Camel book I can look it up myself.
On Sep 6, Paul Jasa said:
>How do I put something I am looking for, and find, with a reg expression
>INTO a variable?
You want to capture the specific part of the regex with ( and ), and then
set that equal to a variable. There are two ways of doing that:
if (/(pattern)/) {
$x = $1; # $
How do I put something I am looking for, and find, with a reg expression
INTO a variable?
I want to put the IP that the reg exp finds into the $ip variable, and I
can't get it to work. Thanks foryour help!!
Paul
while ($iplist) {
print " this is in the first line: $iplist\n";
Try CTRL-Z
-Original Message-
From: Marcelo Aimeta [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 2:51 PM
To: [EMAIL PROTECTED]
Subject: end of file
Hi!
I'm working my way through sams "Teach yourself perl in 21 days" and I'm
stuck.
This is the code that I'm having trou
Hi all...
I hope I didn't ask too much of my fellow perl programmers!
I solved my problem, using print statements! Simple, yet profound.
I apologize for any inconvenience of this thread, thanks...
I surely did not expect an answer right away!
-Scott
Hi all...
I have an attached program w
Brian D Foy wrote:
>
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (David Gilden) wrote:
>
> > perl -e 'foreach $file (glob("*")) {grep '../forum_idx.pl'
>'../cgi-bin/forum_idx.pl');}'
>
> you just want to go through each file and replace those instances?
>
> perl -pi.old -e "s|..
Hi!
I'm working my way through sams "Teach yourself perl in 21 days" and I'm
stuck.
This is the code that I'm having trouble with:
#!/perl/bin/
$wordcount = 0;
$line = ;
while ($line ne "")
{
chop ($line);
@array = split(/ /, $line);
$wordcount += @array;
$line = ;
}
print ("Total number
Hi!
I'm working my way through sams "Teach yourself perl in 21 days" and I'm stuck.
This is the code that I'm having trouble with:
#!/perl/bin/
$wordcount = 0;
$line = ;
while ($line ne "")
{
chop ($line);
@array = split(/ /, $line);
$wordcount += @array;
On Thu, 6 Sep 2001, eric wang wrote:
> I am trying to take this optional parameter into my perl script.
> I use a hypen (-) to indicate that it's a parameter. However, how do i get
> rid of that hyphen? so for example:
> myexe -hello -world -1 when entered into my script it becomes
>
> just ARGV[
Hi people,
I am trying to take this optional parameter into my perl script.
I use a hypen (-) to indicate that it's a parameter. However, how do i get
rid of that hyphen? so for example:
myexe -hello -world -1 when entered into my script it becomes
just ARGV[0] = hello
ARG[1]=world
ARG[2]=1
?
h
Hi Brain,
When i tried $!, i got the below error
[Sat Oct 6 16:56:59 2001] abn.pl: Can't Open the File.
[Sat Oct 6 16:56:59 2001] abn.pl: Not enough space at abn.pl line 6
for the code
$lfile="Z:\\amro\\log\\sar\\pa.txt";
open (FHTML,"< $lfile") || die ("Can't Open the File.\n$!");
But wh
John_Kennedy [mailto:[EMAIL PROTECTED]] wrote:
> I have the following script (simplified)
>
> #!/path/to/perl -w
> open LIST,"/path/to/data" or die "/path/to/data: $!";
> open(SENDMAIL, "|/usr/lib/sendmail -oi -t") or die "Unable to
> fork: $!";
> format SENDMAIL=
> From: Me <[EMAIL PROTECTED]>
>
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (David Gilden) wrote:
> perl -e 'foreach $file (glob("*")) {grep '../forum_idx.pl'
>'../cgi-bin/forum_idx.pl');}'
you just want to go through each file and replace those instances?
perl -pi.old -e "s|../forum_idx.pl|../cgi-bin/forum_idx.pl
In article <005e01c1370a$1a1fd920$f95314ac@04778-9>,
[EMAIL PROTECTED] (McGregory Pinto) wrote:
> How i do a sort, like "sort -k3,5 -d" "" command, in a file using Perl.
you can use a Schwartzian Transform with the sort key being
the part of the string that you extract with substr:
my @sorted
Hello,
What is the best way do to search and replace operation on a whole directory on a UNIX
box?
Sed?
Awk?
Perl?
I know this is wrong, what I want to do is a search and replace,
find '../forum_idx.pl' and replace with '../forum_idx.pl'
I have to hit a whole directory with this change, (and
In article ,
[EMAIL PROTECTED] (Suresh Babu.A) wrote:
> Hi All,
>
> I am unable to open the file, using the below mentioned code.
>
> open (FHTML,"Z:\\amro\\log\\va.txt") || die ("Can't Open the File");
make sure you check to see what the er
Hi all...
I have an attached program w/ text file, if anyone cares to look at...
It is a small perl pgm that checks filesystem(s) which have a soft/hard
limit.
It mails the recipient when a limit is exceeded.
I have just ported to a differnet linux box.
The perl version on the linux box I'm tryin
On Thu, 6 Sep 2001, John_Kennedy wrote:
> I have the following script (simplified)
>
> #!/path/to/perl -w
> open LIST,"/path/to/data" or die "/path/to/data: $!";
> open(SENDMAIL, "|/usr/lib/sendmail -oi -t") or die "Unable to fork: $!";
> format SENDMAIL=
> From: Me <[EMAIL PROTECTED]>
> To: You
I have the following script (simplified)
#!/path/to/perl -w
open LIST,"/path/to/data" or die "/path/to/data: $!";
open(SENDMAIL, "|/usr/lib/sendmail -oi -t") or die "Unable to fork: $!";
format SENDMAIL=
From: Me <[EMAIL PROTECTED]>
To: You <[EMAIL PROTECTED]>
Subj: Stuff
blah blah blah
Thank you
Thanks for all of the help on the delimited text file. I have another
question. My form has several drop down lists/menus. The application that
I'm importing this into has 1 field number for each selection, but I can't
get the delimited file to flow properly.
Example
The pull down list is fo
Hi ...
How i do a sort, like "sort -k3,5 -d" "" command, in a file using Perl.
Sorry my bad english.
Gregory.
Hi All,
I am unable to open the file, using the below mentioned code.
open (FHTML,"Z:\\amro\\log\\va.txt") || die ("Can't Open the File");
Web Server : Apache
OS : Windows 95
The file va.txt is having full permission (rwx for all).
Thanks in advance.
Thanks
SureshA
[EMAIL PROTECTE
Hello:
Thank you for the clarification. One more question: you mentioned
"perlcc"; Is there a web site I can go to which would provide information
regarding this utility and it's status? Thanks.
Dean Theophilou
Genisar
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL P
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address)
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Edwin Gunthner)
wrote:
> Well, and it simply doesnt work; perl tells me that:
> Global symbol "@ISA" requires explicit package name at
> .\/B/C/DescendantOfMyClass.pm line 6.
> Any idea whats wrong here?
always start with h2xs :)
http://
Govinderjit Dhinsa wrote:
>
> How could I please put the following example;
>
> 1000.000
> 10.000
> 100.000
> 1.000
> To please print out, IN A LINE with the Decimal Place! and not from the
> first number, so all the decimal places would line up!
> example;
>
> I have tried prin
You haven't been using printf correctly. Try
foreach (qw(
1000.000
10.000
100.000
1.000))
{
printf "%13.6f\n", $_;
}
The %13.6 gives a total field width of 13 and 6 decimal places. Same as C. The
default is to r
All,
Is it true that Perl 5.005 (UNIX) does not supports UTF? Does this means
Perl code cannot understand non ASCII characters. I have a PERL program
which manipulates data retrieved from XML files and XML data can be non
ASCII.
Any help is appreciated.
Thanks
Quoting from page 122 of O'Reillys "Programming Perl," which, by the way, is
a most excellent book:
Quote: "As an alternate form of right justification, you may also use #
characters (after an initial @ or ^, and with an optional ".") to specify a
numeric field. This way you can line up the de
You could try something like this:
###
use strict
@a = qw(10.000 100.00 100.0 1000.000);
$a = $b = "";
foreach $val (@a) {
($a,$b) = split(/\./,$val);
write;
}
format STDOUT =
@>.@<
$a,$b
.
###
> -Original Message-
There is a CPAN module Text::CSV_XS that you can use. But your data must be
valid CSV ... ie if there is a comma in the string itself , the entire string
must be in quotes like so
John Doe,"1, John Street",DoeVille .
so in your case the proper way to deal with it is to have the input come in
When one thinks of a text delimited file, usually not always, then the fields
would have double quotes around the fields that would have commas in them. There are
modules from CPAN which then can break out the data for you if you don't want to do it
yourself.
Wags ;)
-Original Me
You can delimit a file however you like. If you need to then import the file
into another program, you should make sure you are delimiting with a
character that it recognises.
e.g
one,two,three - comma delimited
one two three - tab delimited
one|two|three - pipe delimited
Look up the sp
Can someone tell me how your delimited text file should look like? Mine is
coming across as the input fields separated by commas, but this producing a
problem when someone is entering a number with a comma in the entry file ie:
10,000.
My text file looks like this:
name,address,city,state,zip,p
You mentioned in the first part of your email that your script does 1,2,3 and
then in hte second half of your email you said it doesn't do 1,2,3 so i am
going to play it safe and assume you need help retrieving the filenames as
well .. (if i am wrong then just ignore that part)
you might want to c
- Begin Forwarded Message -
Date: Thu, 6 Sep 2001 17:12:36 +0200 (MEST)
From: Jorge Goncalvez
Subject: Re:destroy a widget
To: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-MD5: StW+EWXtFYgHx7cbJ1AqZA==
Hi, I would like to parse the last line of a file, if it begins with
I think you mean strings instead of variable names as I said. Are you using 'use
strict'?
It looks like you're passing undefined variables into query_form, in which case
your URL looks like
http://mypc/AspFile.asp?=2000&=24
which isn't right at all. Your JavaScript will look for the two par
Like the others in this group, I too am struggling with PERL and fear I have
bitten more than I can chew.
So I raise my problem to the collective:
I have to write a PERL script that:
1) Collects *.PDF file names off a CD,
2) Parses the filename and
3) saves this information (and some addition
On Thu, 6 Sep 2001, Govinderjit Dhinsa wrote:
> How could I please put the following example;
>
> 1000.000
> 10.000
> 100.000
> 1.000
> To please print out, IN A LINE with the Decimal Place! and not from the
> first number, so all the decimal places would line up!
> example;
>
> I
How could I please put the following example;
1000.000
10.000
100.000
1.000
To please print out, IN A LINE with the Decimal Place! and not from the
first number, so all the decimal places would line up!
example;
I have tried printf and had no luck
Thanks
GD
--
To unsubscribe,
What is the error Deepak?
Don't you mean
$url -> query_form( 'dataReceived' => '2000', 'Area' => '24' );
???
Rob
> -Original Message-
> From: D.Gupta [mailto:[EMAIL PROTECTED]]
> Sent: 06 September 2001 15:33
> To: [EMAIL PROTECTED]
> Subject: To send data from perl script to HTM
Dear all,
I want to send data from perl script to HTML/ASP page (AspFile.asp in following code).
I am using the code which looks like:
use URI:: URL;
my url = url( 'http://mypc/AspFile.asp' );
$url -> query_form( $dataReceived => '2000', $Area => '24' );
$content = get($url);
But it does no
> -Original Message-
> From: THE SPENCERS [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 9:15 PM
> To: [EMAIL PROTECTED]
> Subject: CHDIR
>
>
> Hello Team,
>
> Let me just start my saying I am a very big fan of PERL and this
> mailing
> list. I have been reading
Now I'm confused, I thought a substr would be faster than a regex in this
case as the data is formatted.
Would it?
-
#!/usr/bin/perl -w
use strict;
while ( ) {
my $user = substr($_, 0,8);
my $date = substr($_, 9,32);
my $state = subst
> Dan Grossman <[EMAIL PROTECTED]> said:
> Since I'm on Unix, I could just use something like `spell` to spit out
> all the misspelled words in a more or less reasonable amount of time,
> but getting the _correctly_ spelled words seems to be a more difficult
> task (unless there's some command li
Where may I find some Perl snippets to calculate the response times on a MSSQL
server... not using ping, but actual simple SQL queries??
===
Mike Singleton CCNA, CNE, MCSE
Network Analyst
(253) 272-1916 x1259
(253) 405-1968 (cellular)
[EMAIL PROTECTED]
DaVita Inc.
On Wednesday 05 September 2001 17:26, Linux User wrote:
> One software package I downloaded is supposed to start with a perl
> script, but it doesn't.
>
> I created the necessary config file for the program made it executable,
> and copied it into /usr/bin
> yet when I invoke the program it will
Hi JandR
You're right, the Perl chdir command changes your current effective directory
but doesn't change what 'pwd' reports.
use Cwd;
is what you want. This provides its own 'cwd' and overloads 'chdir' to keep the
PWD environment variable (and, of course, the return from 'cwd') in sync.
H
What sort of comparison are you looking to do on the files?
Name? Date? Size? CRC? etc...
For copying of the files, take a look at the File::Copy module.
http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/File/Copy
.html
For comparison, Perl has some built in (file test operato
Hello Team,
Sorry for the confusion, but what I mean by drop off in is. If I
run the a script from "/home/team/purl" and I choose from the menu
"/home/brian/foy" I would like that to be my pwd from that point on until I
choose another directory from the menu. I have not been able to ge
Is there a reference URL someone can point me to that would explain the rudiments of
simple file copy and compare using Perl under NT/2000 ??
===
Mike Singleton CCNA, CNE, MCSE
Network Analyst
(253) 272-1916 x1259
(253) 405-1968 (cellular)
[EMAIL PROTECTED]
DaVita Inc.
Glad it helped
> -Original Message-
> From: Ken Hammer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 5:26 PM
> To: Kipp, James; [EMAIL PROTECTED]
> Subject: Re: Passing Wild Cards to System Commands
>
>
> Thank you James, that did the trick!
>
>
> "Kipp, James" wro
Sorry (again) that should be 'char *a[]'
R
> -Original Message-
> From: Rob Dixon [mailto:[EMAIL PROTECTED]]
> Sent: 06 September 2001 13:04
> To: Sutapalli eswara; 'Rob Dixon '
> Cc: Beginners@Perl. Org
> Subject: RE: Reg passing arguements
>
>
> Sorry, I misread the question.
>
> T
Sorry, I misread the question.
The only way I can think of to do it is:
int i;
int a[] = {"one", "two", "three", "four", "five");
char command[64] = "perl script.pl ";
for (i = 0; i < sizeof a / sizeof a[0]; ++i)
{
strcat (command, a[i]);
}
system (command)
OK, there are a number of steps you need to take.
First off, you need to grab the hashes from the registry but the key has
SYSYEM only perms on it - as an admin you need to give admin read perms on
HKLM/Security. Then grab the hashes out of there
(HKLM/Security/SAM/Domains/Account/Users or somet
that's not a problem with inheritance, but with 'strict'
do something like:
use vars qw(@ISA);
regards,
Jos
- Original Message -
From: "Edwin Günthner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 1:19 PM
Subject: Problem with inheritance
> Hi there
Hi there,
I have the following files:
B\
MyClass.pm
C\
DescendantOfMyClass.pm
MyClass looks like this:
>>>
package B::MyClass;
...
<<<
and DescendantOfMyClass looks like this:
>>>
package B::C::DescendantOfMyClass;
use B::MyClass;
@ISA = qw(B::MyClass);
...
<<<
Well, and it
> I've been experimenting with ActiveState's PerlAPP (a utility
> available in
> the PDK) over the last few day. It's a pretty cool utility, which
> seems to imbed the Perl interpreter in the proces of making an .exe
> file. However, this has got me to thinking if there is any way to
> compile
That's really easy as long as the array is the /only/ thing you want to pass.
my @array = qw(one two three four five);
printarray (@array);
sub printarray
{
print "@_";# parameter list passed as built-in array @_
}
If, however, you need to pass the array togethe
Dear All,
I want to decrypt some user account's passwords in NT4 registry on PDC. Is
there any module that helps in this regards. I cant do it with
Wi32::TieRegistry. Please suggest me some possible ways..
Thanks in Advance
With regards
Raju
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
Dan Grossman wrote:
>
> Hi,
>
> I have a file of several million words, 80% of which are misspelled
> (i.e. non-words) and 20% of which are spelled correctly. I would like
> to write a short script to read in this file and output only the
> correctly spelled words.
>
> Since I'm on Unix, I cou
Hi, folks I made a file parser to display a progress bar which could tell which
service is running:dhcpd, tftpd or ftp.Each service has its own color.
My problem is that the progress bar didn't stop and I want only a progress bar
that could be destroyed after displaying which service was running
Passwords are encrypted using a one way system. i.e, there is no way to
unencrypt the password hash. You can use a brute force attack on the
password (you encrypt your guesses at the password and then compare the
encrypted hash you generated with the one in the SAM, if they match, then
you've gues
Dear All,
I want to decrypt some user account's passwords in NT4 registry on PDC. Is
there any module that helps in this regards. I cant do it with
Wi32::TieRegistry. Please suggest me some possible ways..
Thanks in Advance
With regards
Raju
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
> if this mail lives in a file, then you can simply check the file
> size, perhaps with the file test operator -s.
>
> my $size = -s $file;
>
> see the section of the perlfunc manpage that talk about these:
>
Nope, unfortunately it's not in a file. The script is used as a
sendmail alias (
76 matches
Mail list logo