Hello,
I'm away from my Perl book and hope one of you will help me.
Would somebody please remind me how to make this line work
for ($x=0;$x<$#{@amen};$x++){
right now, the loop only executes once.
TIA
Robert Monical
[EMAIL PROTECTED] (mailing list stuff)
[EMAIL PROTECTED] (everything
for ($x=0; $x < scalar(@amen); $x++)
Tor.
Robert Monical wrote:
>
> Hello,
>
> I'm away from my Perl book and hope one of you will help me.
>
> Would somebody please remind me how to make this line work
>
> for ($x=0;$x<$#{@amen};$x++){
>
> right now, the loop only executes once.
>
Robert Monical wrote:
>
> Hello,
Hello,
> I'm away from my Perl book and hope one of you will help me.
>
> Would somebody please remind me how to make this line work
>
> for ($x=0;$x<$#{@amen};$x++){
>
> right now, the loop only executes once.
An array in scalar context return the n
All
I have to admit defeat on this one and will gladly acknowledge anyone who
solves it as a genius! The Perl script below is part of an application which
can be tested at
http://www.demo.wizz400.com/scripts/cgi-bin/wizz400/wizz400sop.pl
You can login with a user ID of Wizz400 and a password of
Maurice O'Prey wrote:
> All
>
> I have to admit defeat on this one and will gladly acknowledge anyone
> who solves it as a genius!
Maurice
This isn't really a beginners Perl question, so don't be surprised if
you get an objector or two. However, unrelated to your problem is the
suggestion that yo
Maurice O'Prey wrote:
> All
>
> I have to admit defeat on this one and will gladly acknowledge anyone
> who solves it as a genius!
Maurice,
OK, here's what I think is happening. You have a tag (curiously
inside your ) with an onkeydown attibute of shortcut(). You also
have several tagswith onke
I use it on a MS network to log logins, report on how much space people are using for
their home directories and condense the information from 14 servers' daily backup logs
onto a single html page.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
I have a problem with formating my output. I use sprintf to format a
floating-point number. My output with "%.4f" looks like this:
111.5611
21.4870
10.7046
8.8443
8.6823
but I would like to see it that way:
111.5611
21.4870
10.7046
8.8443
8.6823
So, a kind of combin
"Paul Kraus" <[EMAIL PROTECTED]> wrote in message
005f01c2bc9f$8cff78d0$64fea8c0@pkrausxp">news:005f01c2bc9f$8cff78d0$64fea8c0@pkrausxp...
> What are some of the ways you guys use Perl for network administration?
>
1. I search an FTP site daily for updated files that I then download and use
to cre
Hi,
I am a novice in Perl and I want to implement
telnet in perl. If you have any tutorials or source
code available with you , please forward me.
Thanking you in advance,
Regards,
Shirish
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable.
I'm trying to count first occurrence of a pattern in a block of lines
which have the same number in first field. I was using if statements to
test the conditions. The problem is that it reads the pattern of every
line, not skipping rest of the block if the pattern has been matched.
Putting th
Hi,
I have written a perl program that is supposed to search for a set of
customer details on our database and return them 1 after the other.
The problem is that it is returning the customers as well as cdetail
id, type, checksum. The problem is that is returning the checksum the
same amount of ti
Dear Sir,
I am not able to understand about IP/Subnet
Calculation as I amnot understand properly about IP
and Use of IP. I am trying to understand these by
reading books but not able to understand completely.
Pls. give some idea redarding this.
Rgds
Muhi
Assam
___
Hi -
> -Original Message-
> From: Maurice O'Prey [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 11:52 PM
> To: [EMAIL PROTECTED]
> Subject: JavaScript/Perl Genius Sought
>
>
> All
>
> I have to admit defeat on this one and will gladly acknowledge anyone who
> solves it a
Hi -
> -Original Message-
> From: Konrad Foerstner [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 11:27 AM
> To: [EMAIL PROTECTED]
> Subject: floating-point number on the right side with sprintf
>
>
> Hi,
>
> I have a problem with formating my output. I use sprintf to fo
Hi -
> -Original Message-
> From: shirish doshi [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 12:50 PM
> To: [EMAIL PROTECTED]
> Subject: Help for telnet using perl
>
>
> Hi,
>I am a novice in Perl and I want to implement
> telnet in perl. If you have any tutorials o
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):
Hi Seamus
Seamus Carr wrote:
> I'm trying to count first occurrence of a pattern in a block of lines
> which have the same number in first field.
'Count the first occurrence'? That would be '1' ;-)
> I was using if statements
> to test the conditions. The problem is that it reads the pattern of
A great starter book I used was Beginning Perl by Simon Cozens, published by
Wrox. ISBN - 1861003145. I use it as a quick reference as well.
I recommend it highly to anyone learning perl.
-Original Message-
From: Ben Siders [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 11:5
Hi,
I just wanted to say a HUGE thank you to:
David Kirol
Bob Showalter
Dan Muey
for their combined help in getting perl to work on my
apache server...it was a combination of sorting out
the httpd file and changing the perl path from
#!usr/local/bin/perl to #!c:/perl/bin/perl.exe
(something I di
Hi all!
I'm some writing scripts using the module Net::SNMP.
Is this module a performant one, or are there faster ones available?
I tried the SNMP module that uses Net_SNMP, but the last version is from
2000 and I could get it installed...
Thanx!
Wim
--
To unsubscribe, e-mail: [EMAIL PROTEC
From: Ben Siders <[EMAIL PROTECTED]>
> I've got a real easy one here (in theory). I have some XML files that
> were generated by a program, but generated imperfectly. There's some
> naked ampersands that need to be converted to &. I need a regexp
> that will detect them and change them. Sounds
I'm not a network admin now. Currently I use Perl for things like:
Preprocessing and archiving log files, searching for errors and
unexpected messages them and mailing the result to me for review.
Indexing the files on the production, QA and development servers and
generating ZIPs with the file
Seamus Carr wrote:
>
> I'm trying to count first occurrence of a pattern in a block of lines
> which have the same number in first field. I was using if statements to
> test the conditions. The problem is that it reads the pattern of every
> line, not skipping rest of the block if the pattern ha
I have happily been having a script running to add users into groups.
Suddenly one of the scripts on 1 machine stopped working, while the
other machine, setup like the first machine works, it's the same script
in both, whats altered is the machine name. I even copyed the script
from the machine tha
I wrote a script that generates an excel file. I tested it on a windows
xp pro machine and everything was ok. When I put the script on the UNIX
server and run it I get blocks on my excel sheet where new lines
occurred. How can I have the UNIX Perl write out Microsoft new line
characters so that the
Whew! That's the same one I finally came up with. Glad to see I was on
the right track. The original solution didn't work at all.
Toby Stuart wrote:
-Original Message-
From: Ben Siders [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 7:38 AM
To: Perl
Subject: Escaping Am
Hi,
I'm just stumped by this one. It all started when I was trying to work
out a backup method of backing up all subdirs of /home/user as
individual tarballs. So I wanted to copy everything from the user's
top level directory to a temporary backup directory. This included
all hidden file, hidden di
Are there any CPAN modules that can analyze XML or HTML and report any
cases of unclosed tags? For example:
Hello, world
Me
Hey, is thing thing on?
In the above, I'd like to find a method of detecting that the bold tag
is missing a closer.
--
To unsubscribe, e-mail: [EMAIL PROTE
I think unix uses \n and winders uses \n\r so you may need to use \n\r or \r instead
of \n
Or someother line ending \f or??
Dan
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 7:45 AM
> To: Perl
> Subject: Spreadsheet::WriteExcel -
> > All
> >
> > I have to admit defeat on this one and will gladly
> acknowledge anyone
> > who solves it as a genius! The Perl script below is part of an
> > application which can be tested at
> >
> > http://www.demo.wizz400.com/scripts/cgi-bin/wizz400/wizz400sop.pl
> >
> > You can login wi
> Hi,
Howdy
>
> I have written a perl program that is supposed to search for
> a set of customer details on our database and return them 1
> after the other. The problem is that it is returning the
> customers as well as cdetail id, type, checksum. The problem
> is that is returning the check
Dan et all
>I also am applying for genius, looks good on resume!
>Actually it's wizz400 and wizz400 lowercase 'W'
>I logged in fine but am not quite sure what the problem is.
>Could you elaborate what your'e trying to figure out?
>May be I missed an earlier post about it
The problem has been res
> Dan et all
>
> >I also am applying for genius, looks good on resume!
> >Actually it's wizz400 and wizz400 lowercase 'W'
> >I logged in fine but am not quite sure what the problem is.
> Could you
> >elaborate what your'e trying to figure out? May be I missed
> an earlier
> >post about it
>
>
At 01:12 AM 1/16/2003 -0800, you wrote:
Robert Monical wrote:
>
> Hello,
Hello,
> I'm away from my Perl book and hope one of you will help me.
>
> Would somebody please remind me how to make this line work
>
> for ($x=0;$x<$#{@amen};$x++){
>
> right now, the loop only executes once.
An
Dan Muey wrote:
>> Dan et all
>>
>>> I also am applying for genius, looks good on resume!
>>> Actually it's wizz400 and wizz400 lowercase 'W'
>>> I logged in fine but am not quite sure what the problem is. Could
>>> you elaborate what your'e trying to figure out? May be I missed an
>>> earlier post
Howdy group,
I've also posted this message with the dbi mailing list but so far nothing from them...
I have a script that does several queries and I have trouble with one :
I can't seem to get a particular query to prepare().
$queryqq = "SELECT * FROM $root_table WHERE ID=\'$Root_ID_DB\'";
P
Hi list members,
I have some problems with a script using hashes.
I use hashes for years but never had this kind of problem before...
I have a ascii file with 6.5 MB of data. This file is tokenized by Parse:Lex
module.
The tokens are then stored in a two level hash:
$TokenHash{$TokenType}->{$Token
I am reading in a text file that has input similar to this.
date|data|data|data\n
I then read the file in and using a while loop I chomp off the new line.
while (){
chomp;
@line=split /\|/,$_;
$line[2]=~s/ //g;
print "$_" foreach (@line);
last;
$count++;
last if ($count
Hi -
> -Original Message-
> From: Ben Siders [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 4:38 AM
> To: Perl
> Subject: Request for a CPAN Module
>
>
> Are there any CPAN modules that can analyze XML or HTML and report any
> cases of unclosed tags? For example:
>
>
>
> Toby Stuart wrote:
> >Try this one:
> >
> > s/&(?!\w+;)/&/g
Problem is that this will break things like
@
Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
--
Hi,
In this example, to 'catch' if the socket could not be created, by using -> or die
"";
#!/usr/bin/perl -w
use IO::Socket;
$remote = IO::Socket::INET->new(
Proto=> "tcp",
PeerAddr => "localhost",
PeerP
Hi list,
Whenever I load an SVG document into my apache browser
it prints the contents of the XML. I'm presuming that
apache doesn't come equiped to deal with SVG?
Do I need a special module to install? Or can I modify
the httpd file to deal with SVG types (in a sense,
switch it on?)
e.g.: AddTyp
> I am reading in a text file that has input similar to this.
> date|data|data|data\n
>
> I then read the file in and using a while loop I chomp off
> the new line. while (){
> chomp;
> @line=split /\|/,$_;
> $line[2]=~s/ //g;
Do you mean $line[3] since that is the last one in the ar
Jenda Krynicky wrote:
>> Toby Stuart wrote:
>>> Try this one:
>>>
>>> s/&(?!\w+;)/&/g
>
> Problem is that this will break things like
> @
>
Why not just:
s/&(?!amp;)/&/g
i.e. change every ampersand that isn't followed by 'amp;' into &
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
any of the array elements when printed act as if they have a new line.
So it would be the last array element printed. In the case it could be 3
but it could also be 2 or 4.
> -Original Message-
> From: Dan Muey [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 10:49 AM
> To: P
Hello
I'm maintaining a 4 year old mod_perl Web application.
Several months ago, this list helped me to get the following working
I spent a couple of hours last night trying to figure out if
there is a way to do this in a single statement.
$val->{'Ammenities' } is set upstream and is a scalar
if
> any of the array elements when printed act as if they have a
> new line. So it would be the last array element printed. In
> the case it could be 3 but it could also be 2 or 4.
Then do a froeach loop on each item in the array replacing \n's and \r's and
spaces( if you want to kill space that
Hi -
> -Original Message-
> From: Admin-Stress [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 5:49 AM
> To: perl
> Subject: Catching unknown socket (or unknown handle / filehandle)
>
>
> Hi,
>
> In this example, to 'catch' if the socket could not be created,
> by using -
come to think of it. This "newline" I am getting must be a result of
windows just dropping my prompt to the next line. So I assumed it was
there...
Stupid me. I am used to Linux which does not do this in the shell.
Ok then this brings me full circle.
When I run this program on UNIX it makes an exc
> Hi list,
>
> Whenever I load an SVG document into my apache browser
> it prints the contents of the XML. I'm presuming that
> apache doesn't come equiped to deal with SVG?
Is you path to perl /usr/bin/perl ?
What? That has nothing to do with your question? Huh that's odd.
You really need to g
attached is a copy of the excel file if it helps.
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 11:03 AM
> To: 'Dan Muey'; 'Perl'
> Subject: RE: Where is the new line coming from.
>
>
> come to think of it. This "newline" I am gett
Just FYI
Here's the entire code surrounding it from db connection to disconnect :
my $dbhqq = DBI->connect("DBI:mysql:$db_use:$db_host","$db_user","$db_pass");
$queryqq = "SELECT * FROM $root_table WHERE ID=\'$Root_ID_DB\'";
print $queryqq;
#DBI->trace(1,"trace.txt");
($tmp = $quer
Paul Kraus wrote:
> attached is a copy of the excel file if it helps.
Paul
You have CRLF at the end of the line. chomp will only remove the LF. Try
s/[[:cntrl:]]$//g;
instead of chomp.
HTH,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
Greetings,
I have a quick question. In the code below I get an error message that says 'Global
symbol "@fields" requires explicit package name'
The line that causes the error is highlighted in red. Obviously it has to do with how
I declared the variable in my subroutine. I tried moving curly br
Because of ©
I don't want that to get changed. In the end, something like:
s/&(?!\w+|[#\d]+;/&/g
Works. That might not be quite right, but I think you know what I'm
getting at.
Rob Dixon wrote:
Jenda Krynicky wrote:
Toby Stuart wrote:
Try this one:
s/&(?!\w+;)/&/g
Proble
> attached is a copy of the excel file if it helps.
I see it now.
It's probably some odd unprintable character.
You could try somehting like this that will change unprintable
characters to their viewable equivalent
( ascii, hex?? I can't remember.)
But I got his form someone a while ago.
($tm
Admin-Stress wrote:
> Hi,
>
> In this example, to 'catch' if the socket could not be
> created, by using -> or die "";
>
> #!/usr/bin/perl -w
> use IO::Socket;
> $remote = IO::Socket::INET->new(
> Proto=> "tcp",
> PeerAddr => "localh
Robert Monical wrote:
> Hello
> I'm maintaining a 4 year old mod_perl Web application.
>
> Several months ago, this list helped me to get the following working
>
> I spent a couple of hours last night trying to figure out if
> there is a way to do this in a single statement.
>
> $val->{'Ammenities'
Ok,
I think I am beginning to see the light...
but I am still in the dark on this one...
How would I iterate over these arrays?
$MyArray[0][0][0] = "A 1";
$MyArray[0][1][0] = "comment 1";
$MyArray[0][0][1] = "A 2";
$MyArray[0][1][1] = "Comment 2";
$MyArray[1][0][0] = "B 1";
$MyArray[1][1]
Interesting When I run the script on my windows box (5.6.1) I get
this output
DEBUG : NON PRINT ACHAR -011747-
DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm -
DEBUG : NON PRINT ACHAR -139.45-
Same script same source file r
> Interesting When I run the script on my windows box
> (5.6.1) I get this output
> DEBUG : NON PRINT ACHAR -011747-
> DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm -
> DEBUG : NON PRINT ACHAR -139.45-
>
> Same script sam
Paul Kraus wrote:
> Interesting When I run the script on my windows box (5.6.1) I get
> this output
> DEBUG : NON PRINT ACHAR -011747-
> DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm -
> DEBUG : NON PRINT ACHAR -139.45-
>
> Same script same source file run on sco o
Nevermind. I figured it out. It seems that in the routine that
contained the eval changed the value of $db_use to $db_user
due to my bad typing. Which made it seem like the eval was
the problem when it wasn't.
So it couldn't prepare the statement because that table didn't
exist in the database
> Paul Kraus wrote:
> > Interesting When I run the script on my windows box
> (5.6.1) I get
> > this output
> > DEBUG : NON PRINT ACHAR -011747-
> > DEBUG : NON PRINT ACHAR -Eco-Liner w/Att A=30-35 B=23-29cm
> - DEBUG :
> > NON PRINT ACHAR -139.45-
> >
> > Same script same
Sorry,
I should have said... "How would I iterate over these arrays using foreach"
-Original Message-
From: Liss, Mike [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 8:33 AM
To: [EMAIL PROTECTED]
Subject: multi-dimensional array foreach loop...
Ok,
I think I am beginning
Mike Liss wrote:
> Ok,
>
> I think I am beginning to see the light...
> but I am still in the dark on this one...
>
> How would I iterate over these arrays?
>
> $MyArray[0][0][0] = "A 1";
> $MyArray[0][1][0] = "comment 1";
>
> $MyArray[0][0][1] = "A 2";
> $MyArray[0][1][1] = "Comment 2";
>
> $MyArr
Ok the highlights do not seem to have made it, I marked the line that is getting the
error message.
Thanks
#this is the subroutine to search the file
sub search{
open(FILE, ') {
chomp; # remove newline
my @fields = split(/\|/, $_);
# test whether the
Hey Ben,
My MUA believes you used Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20021223
to write the following on Thursday, January 16, 2003 at 9:37:34 AM.
BS> Are there any CPAN modules that can analyze XML or HTML and report
BS> any cases of unclosed tags? For example:
I u
Le Blanc wrote:
> Greetings,
> I have a quick question. In the code below I get an error message
> that says 'Global symbol "@fields" requires explicit package name'
> The line that causes the error is highlighted in red. Obviously it
> has to do with how I declared the variable in my subroutine.
At 2:49 PM -0800 1/15/03, shirish doshi wrote:
Hi,
I am a novice in Perl and I want to implement
telnet in perl. If you have any tutorials or source
code available with you , please forward me.
Thanking you in advance,
Regards,
Shirish
Shirish,
Perl has the Net::Telnet module:
http://search
Zentara wrote:
---
> #!/usr/bin/perl -w
>
> @users=('/home/zentara');
>
> #put all user-root hidden files and hidden dirs into 1 temp dir
> #this makes it easier to backup second level subdirs
> fore
Ben Siders wrote:
> Are there any CPAN modules that can analyze XML or HTML and report any
> cases of unclosed tags? For example:
>
>
> Hello, world
> Me
> Hey, is thing thing on?
>
>
> In the above, I'd like to find a method of detecting that the bold tag
> is missing a closer.
Hi there,
How can i execute a perl/cgi application with its
own web server ?, I want the user to be able to
execute my web/based application in his/her local
windows pc without a webserver installed locally?
Let say http://myapplication:port/, something like
that.
What module can i use
Schoenwaelder Oliver wrote:
> Hi list members,
>
> I have some problems with a script using hashes.
> I use hashes for years but never had this kind of problem before...
> I have a ascii file with 6.5 MB of data. This file is tokenized by
> Parse:Lex module.
i never use this module before so i d
Mike Liss wrote:
> Sorry,
>
> I should have said... "How would I iterate over these arrays using
> foreach"
> Mike
using foreach? have you try this yet?
#!/usr/bin/perl -w
use strict;
my @array = ([[1..5],[2..6],[7..10]],[[11..15],[16..20],[21..25]]);
foreach(my $i = 0; $i < @array; $i++){
He folks!
Todays problem:
I need to get a value from an environment variable VALUE. This value is
set by an shell script which location is stored in anonther environment
variable called SCRIPT. So I first call the shell script by
`. \$SCRIPT`;
and extract then the value of VALUE by
my $value =
On Thu, Jan 16, 2003 at 08:58:22PM +0100, Konrad Foerstner wrote:
> I need to get a value from an environment variable VALUE. This value is
> set by an shell script which location is stored in anonther environment
> variable called SCRIPT. So I first call the shell script by
>
> `. \$SCRIPT`;
>
> > I need to get a value from an environment variable VALUE. This value is
> > set by an shell script which location is stored in anonther environment
> > variable called SCRIPT. So I first call the shell script by
> >
> > `. \$SCRIPT`;
> >
> > and extract then the value of VALUE by
> >
> > my
Very CutE !!!
Mark
- Original Message -
From: "Paul Corr" <[EMAIL PROTECTED]>
To: "shirish doshi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, January 16, 2003 12:10 PM
Subject: Re: Help for telnet using perl
> At 2:49 PM -0800 1/15/03, shirish doshi wrote:
> >Hi,
> >I a
From: zentara <[EMAIL PROTECTED]>
> I made a little test case to demonstrate the problem.
> The following script is run by root in /home/user:
> /home/zentara/backup-homex
>
--
> - #!/usr/bin/perl -w
>
From: Schoenwaelder Oliver <[EMAIL PROTECTED]>
> I have some problems with a script using hashes.
> I use hashes for years but never had this kind of problem before...
I
> have a ascii file with 6.5 MB of data. This file is tokenized by
> Parse:Lex module. The tokens are then stored in a two level
From: "Dan Muey" <[EMAIL PROTECTED]>
> I think unix uses \n and winders uses \n\r so you may need to use
\n\r
> or \r instead of \n
It should be \r\n (also read CRLF).
And Macs (the old ones) used \r.
> From: Paul Kraus [mailto:[EMAIL PROTECTED]]
>
> I wrote a script that generates an excel f
I've got a CSV file which I need to process. The format is as follows.
"Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida
"Doe, John L",1/1/2002,1/15/2002,Los Angeles, California
I've tried splitting it using: @row = split(",",$data);
The problem is with the fields that contain the comma
Hello,
Is there an easy way to get the location of a specific instance of a
character
in an array?
for example:
$MyArray = "This is the test";
I would like to know the index of the first occurence of the letter "h" ( 1
)
Thanks
Mike
How can I write to a file in perl.
Thomas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> Is there an easy way to get the location of a specific instance of a
> character in an array?
>
> for example:
>
>$MyArray = "This is the test";
>
> I would like to know the index of the first occurence of the letter "h"
( 1
perldoc -f index
index $MyArray,'h';
--
To unsubscribe, e-mail
" ... apache isn't seeing
*.cgi as a script and is dumping it as a txt file onto
the browser..."
Hi Ben,
Have you configured Apache for the .pl and .cgi extensions? On IIS, I had to
explicitly set the server to run these two extensions as perl. I haven't worked with
Apache, so I don't know wh
On Thu, 16 Jan 2003 15:12:05 -0800
"Scott, Joshua" <[EMAIL PROTECTED]> wrote:
> I've got a CSV file which I need to process. The format is as follows.
>
> "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida
> "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California
>
> I've tried splitting
On Thu, Jan 16, 2003 at 03:21:13PM -0800, Liss, Mike wrote:
> Is there an easy way to get the location of a specific instance of a
> character in an array?
>
> for example:
>
> $MyArray = "This is the test";
>
> I would like to know the index of the first occurence of the letter "h" ( 1
> How can I write to a file in perl.
perldoc -f open
open(FILEHANDLE, ">$path_to_file") or die $@;
print FILEHANDLE $newfilecontents;
close(FILEHANDLE);
> writes over
>> appends
< reads
open...
@lines_in)file = ;
close...
Dan
>
> Thomas
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED
I figured regular expressions where the solution but I'm just starting to
learn how to use regular expressions.
Also, only the first field always has a comma between the quotes. The other
fields are not consistent.
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
-Original Mes
Try using the Text::CSV module...
On Fri, 2003-01-17 at 10:12, Scott, Joshua wrote:
> I've got a CSV file which I need to process. The format is as follows.
>
> "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida
> "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California
>
> I've tried sp
From: "Liss, Mike" <[EMAIL PROTECTED]>
> Is there an easy way to get the location of a specific instance of a
> character in an array?
>
> for example:
>
> $MyArray = "This is the test";
>
> I would like to know the index of the first occurence of the letter
> "h" ( 1 )
index $MyArr
From: "Scott, Joshua" <[EMAIL PROTECTED]>
> I've got a CSV file which I need to process. The format is as
> follows.
>
> "Smith, John J",1/1/2002,1/15/2002,"Orlando, FL",Florida
> "Doe, John L",1/1/2002,1/15/2002,Los Angeles, California
>
> I've tried splitting it using: @row = split(",",$data)
open(OUT, "> test.txt") || die;
print OUT "This is a test...\n";
print OUT "More text...\n";
close(OUT);
On Fri, 2003-01-17 at 08:26, [EMAIL PROTECTED] wrote:
> How can I write to a file in perl.
>
> Thomas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL P
> -Original Message-
> From: Scott, Joshua [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 17, 2003 10:12 AM
> To: [EMAIL PROTECTED]
> Subject: Splitting a variable
>
>
> I've got a CSV file which I need to process. The format is
> as follows.
>
> "Smith, John J",1/1/2002,1/15/200
> -Original Message-
> From: Liss, Mike [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 17, 2003 10:21 AM
> To: [EMAIL PROTECTED]
> Subject: determining location of character in array
>
>
> Hello,
>
> Is there an easy way to get the location of a specific instance of a
> charac
if ($TestEMail =~ /\w+@\w+\.\w{2,3}/) {print "$TestEMail\n";}
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
"...Is there any way I can have two different paths to the Perl executable,
and let my script decide which to use?" Rob
Hi Rob,
You shouldn't need to, probably. At least on Win 2K, ActiveState Perl ignores the
comment line completely. If you have it properly installed, the paths should alredy
1 - 100 of 114 matches
Mail list logo