HAHAHAHAHAHA!
-Chris
On Friday 06 December 2002 03:51 pm, [EMAIL PROTECTED] wrote:
> He forgot to mention the:
>
> use Advil;
>
> $pills = new Advil(2);
> unless($pills->take(orally)) {
> sleep 40;
> }
>
> http://danconia.org
>
>
>
Hi,
Hopefully this isn't too stupid of a question. Thanks in advance for any
help.
Can anyone tell me why, when I feed a file of the following format
Date,Time,Action,Result,Client,Server,From,To,To,To,...,Subject,Size,SMTPID
20021128,9,Message Accepted,,10.0.0.1,,[EMAIL PROTECTED],[EMAIL PRO
Thanks Gang,
I ended up with
"if ( $line =~ m/^(ORA-\d+):/ ) {"
-Original Message-
From: Paul Kraus [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 11:11 AM
To: [EMAIL PROTECTED]; Perl
Subject: RE: Regex
Ummm no your are correct. I assumed it was imbedded in other text
Paul Johnson wrote:
> But it might. The behaviour is undefined. The compiler may do as it
> will. Google for "sequence point" if you want to find out more.
>
> The behaviour in Perl is undefined too, but more in the sense that the
> behaviour has not been defined rather than that the behaviour
Paul Kraus wrote:
>
> My reports seem to perform a form feed with "^L" this doesn't seem to
> all me to find it with regexpr. Do I have to search for the ASCII
> equivalent? What does this translate to and where did you look to find
> out?
The form feed character is reresented by \f (or \cL or \0
Hi guys, I am trying to write a client/server app. The problem I am having,
has to do with line terminators. my questions is when I connect from unix to
windows do I need to set $\= CRLF and form windows to unix $\=LF ?? also is
there a method to deturnime which machine is connecting to which ??. I
On Fri, Dec 06, 2002 at 02:46:13PM -0800, david wrote:
> btw, the ++$i / ++$i gives you a 1 thing behaves differently in other
> programming languages. For example, try the following in C++:
>
> #include
> void main{
> int i=2;
> int j=++i/++i;
> cout< }
>
> won't give y
Jeff 'Japhy' Pinyan wrote:
>
> Strictly speaking, there is another major difference no one has mentioned
> yet (and that many people might have trouble understanding). Using
> $count++ returns a NUMBER OR STRING, and then increments $count's value.
> ++$count increments $count's value, and retur
On Fri, Dec 06, 2002 at 04:22:19PM -0500, Jeff 'japhy' Pinyan wrote:
> On Dec 6, Paul Johnson said:
>
> >On Fri, Dec 06, 2002 at 11:58:37AM -0500, Danny Miller wrote:
> >
> >> Strictly speaking, ++$count is faster than $count++.
> >
> >Strictly speaking, perl will convert $count++ to ++$count if i
On Dec 6, Paul Kraus said:
>if ($data=~m/\f([0-9][0-9]\/[0-9][0-9]\/[0-9][0-9])/){
> $pos=tell (FILE);
> print "$pos --pos\n";
> last;
>}
You don't want tell(FILE). You want to know WHERE in $data the pattern
matched. For that, use the @- array (if you've got Perl 5.6
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 4:50 PM
> To: 'Bob Showalter'; 'Perl'
> Subject: RE: Seek tell
>
>
suggest you add:
use Fcntl qw(:seek);
then you can use the SEEK_* constants to make your code more readable.
> ope
So do you want to bring together all the data related to Peter,
James, etc, so you can write another file with all the data together or you
are searching for Peter and ONLY want to write out the data of Peter?
Wags ;)
-Original Message-
From: Alfa rOMEO [mailto:[EMAIL PROTECTED]]
He forgot to mention the:
use Advil;
$pills = new Advil(2);
unless($pills->take(orally)) {
sleep 40;
}
http://danconia.org
On Fri, 6 Dec 2002 16:22:19 -0500 (EST), "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]>
wrote:
> On Dec 6, Paul Johnson sai
open FILE, "<$filename" or die "Couldn't open $filename : $!\n";
seek (FILE,0,2);
for($i=-2048;1;$i-=2048){
seek (FILE,$i,1);
$/=undef;
$data=;
if ($data=~m/\f([0-9][0-9]\/[0-9][0-9]\/[0-9][0-9])/){
$pos=tell (FILE);
print "$pos --pos\n";
last;
}
}
seek
what have you tried ?
-Original Message-
From: Alfa rOMEO [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 4:36 PM
To: [EMAIL PROTECTED]
Subject: simple Perl prog
Hi,
I have a problem and search after a simple perl solution:
I want to search in a file after a Username and w
> -Original Message-
> From: Paul Kraus [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 4:42 PM
> To: Perl
> Subject: Seek tell
>
>
> I am reading through a file.
> I am testing it for a regexrp. If expr is true then I save the pos of
> the file to a variable using tell.
>
>
I am reading through a file.
I am testing it for a regexrp. If expr is true then I save the pos of
the file to a variable using tell.
But it always the eof position an not the position directly before the
match. Any thoughts?
Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
Hi,
I have a problem and search after a simple perl solution:
I want to search in a file after a Username and write all lines with this
username in a new file.
Example:
TestUSERPeterFAX011234567
TestUSERPeterPHONE456789
and so on
Thank u for answer.
Best regards
Captain Mike
_
On Dec 6, christopher j bottaro said:
>i'm a c/c++ programmer trying to learn perl. there are just some things that
>are much more easily done in a language like perl than in c/c++ i've found
>out...=) anyways, i'm reading a short tutorial about references. am i wrong
>in thinking they are like
Hi,
I have a problem and search for a simple perl solution:
Here are the task:
Source File: Domainname Username Field Fieldname
Example: Test Peter FAX 0112345678
I want search in the source file after a special entry in the Fieldname .
Want to read the Username and write then all li
Hi All:
I'm trying to find documentation on SetReadMode. It's in CPAN module
"Term::ReadKey", which I can't persuade to work with Perl2exe (for NT AND
Solaris AND HP-UX), so I'd like to pick out the bits of code I need and put
them in my own script. First, I'd like to understand what SetReadMode i
On Dec 6, Paul Johnson said:
>On Fri, Dec 06, 2002 at 11:58:37AM -0500, Danny Miller wrote:
>
>> Strictly speaking, ++$count is faster than $count++.
>
>Strictly speaking, perl will convert $count++ to ++$count if it can.
Strictly speaking, there is another major difference no one has mentioned
y
On Fri, Dec 06, 2002 at 11:58:37AM -0500, Danny Miller wrote:
> Strictly speaking, ++$count is faster than $count++.
Strictly speaking, perl will convert $count++ to ++$count if it can.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
Yes,
You can dl and install a Solaris compatible version of gcc and use it to
install perl
I do not have the url handy, but their is a sun page for third party (GNU
type) software.
-Ron
-Original Message-
From: Tony Yi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 15:30
T
Well, it depends how you use them.
Strictly speaking, ++$count is faster than $count++.
say $count = 5
$num1 = $count++; #$num1 would = 5 and $count would = 6
$num2 = ++$count; #$num2 and $count would equal 6
Regards,
Danny
-Original Message-
From: Mystik Gotan [mailto:[EMAIL PROTECTE
Hi, Sean && List
>$Hash{"$User"}{"$Page"}{"$NumTimesVisited"} = $ANumber;
> Is this possible?
Sure, this will work.
I would decrease the hash depth a bit:
$Hash{$User}{$Page} = $NumTimesVisited;
> If so, how would I traverse this, as I will not know
> before hand the values in the hash; I wi
You can do something like this:
%url_options_hash = ("times_visited"=>0);
%url_hash = ("this_url"=>\%url_options_hash);
%usr_hash = ("igor"=>\%url_hash);
print $usr_hash{"igor"}->{"this_url"}->{"times_visited"}, "\n";
$usr_hash{"igor"}->{"this_url"}->{"times_visited"} = 1;
print $
sun solaris have come with perl, But it is use cc as default c
compiler. I don't have license Sun C compiler, Can I change to C
compiler to gcc.
Thanks in advance
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
>I want to start a program in perl but i need to keep
>the pid to be able to kill it in the future.
>
>For exmple:
>
>system("top &");
>
>this would start "top", but then i wouldn't be able to
>identify the process in order to kill it. Is there a
>way to do this (other than using fork) ?
Have yo
http://www.cpan.org/src/
links from that page get you where you want. Install directions linked
from perl.org are at
http://dev.perl.org/perl5/news/2002/07/18/580ann/INSTALL
Best regards,
Chris
On Thursday, December 5, 2002, at 01:40 PM, Paul Kraus wrote:
I see that the newest version of P
cool thanks. and yes i'm reading perlreftut but not perlref. perlref looks a
bit too exhaustive for my purposes now. perhaps in the future when i become
more advanced in the ways of perl.
and Timothy, yeah i'm sure there are difference of course, but i guess i was
asking very generally if it
On Fri, 6 Dec 2002 13:57:33 -0600, christopher j bottaro <[EMAIL PROTECTED]> wrote:
> hello,
> i'm a c/c++ programmer trying to learn perl. there are just some things that
> are much more easily done in a language like perl than in c/c++ i've fou
Yes and no. I think that if you understand the concept of pointers, then
you will be able to understand references more easily, but from what keep
hearing from c/c++ people, there are differences. Perhaps someone else on
the list can clarify more.
One thing that Perl can do with references that
hello,
i'm a c/c++ programmer trying to learn perl. there are just some things that
are much more easily done in a language like perl than in c/c++ i've found
out...=) anyways, i'm reading a short tutorial about references. am i wrong
in thinking they are like pointers in c/c++?
-- christoph
My reports seem to perform a form feed with "^L" this doesn't seem to
all me to find it with regexpr. Do I have to search for the ASCII
equivalent? What does this translate to and where did you look to find
out?
Paul
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
p.s. see perldoc perlvar and search for "INPUT_RECORD_SEPARATOR"
http://danconia.org
On Fri, 6 Dec 2002 13:31:48 -0600, [EMAIL PROTECTED] wrote:
> Perl special variable it is the "input separator". From the camel (the real one):
>
> "Entirely u
Perl special variable it is the "input separator". From the camel (the real one):
"Entirely undefining $/ makes the next line input operation slurp in the remainder of
the file as one scalar value."
Which is how it was used in the first post. See $\ for the output separator.
It is a good idea
What is $/ Is this a made up variable or a Perl special variable? I
don't recall coming across it in the learning Perl book. But I have just
started the programming Perl book.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
> Behalf Of zentara
> Sent: Frid
I bought the O'Reilly book "Learning Perl" as well as the O'Reilly Perl
pocket reference. I found the learning perl book to be a great starting
point and the pocket reference is invaluable for looking things up
quickly.
Dylan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTE
Ummm no your are correct. I assumed it was imbedded in other text so do
this instead.
m/\bORA-(\d+)\b/
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Regex
>
>
> > m/\s*ORA-(\d+)\
Michael Weber wrote:
>
> It was a trailing space in $_ that was getting me. I changed a chomp
> to a chop and it now finds the string.
It would be better to use s/\s+$// to remove trailing whitespace as it
removes _only_ whitespace whereas chop will remove _any_ character from
the end of the st
> m/\s*ORA-(\d+)\s+/
Correct me if I'm wrong, but wont this match fail if there are no
spaces after
ORA-600
I would think this is better
if ($line =~ m/ORA-(\d+)/){$number = $1;}
> > Hello list,
> >
> > I am trying to code a regex to pull out the number part of
> > "ORA-600" or 600.
> >
> >
Steve Main wrote:
>
> Hello list,
Hello,
> I am trying to code a regex to pull out the number part of "ORA-600" or 600.
>
> I have started with "if ($line =~ m/^(ORA-)(\-[0-9]*)$/) {" but this
> is obviously wrong.
Yes, it is trying to match ORA--600 (two hyphens.)
> Anyone out there willi
Since I am not familiar with your data I will assume that it occurs
anywhere is $line you want to still match.
m/\s*ORA-(\d+)\s+/
Any spaces characters followed by ORA- followed by any digits 0-9
followed by any space characters. Using the () you have placed that
portion of the match into variable
Hello list,
I am trying to code a regex to pull out the number part of "ORA-600" or 600.
I have started with "if ($line =~ m/^(ORA-)(\-[0-9]*)$/) {" but this
is obviously wrong.
Anyone out there willing to get me on the right track?
thanks
Steve
--
To unsubscribe, e-mail: [EMAIL PROTEC
Yup... good catch... i should run my code rather than just type it in a
mail window i guess :-)
> Don't you mean ++$count??
>
> > my $i = $++count;
> > print "$i\n";
> >
> > On Sat, 2002-12-07 at 03:54, Mystik Gotan wrote:
> > > Hiya,
> > >
> > > is there any difference between $count++
I'm having problems compiling perl mod SNMP::Uitl, I get the following error
when I do a make test. Any help would be greatly appreciated.
gotgraphs# make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/usr/libdata/perl/5.00503/mach -I/usr/libdata/perl/5.00503 -e 'use
Test::Harness
Welcome!
http://www.perl.org
http://learn.perl.org
and the many, many links posted there.
Aloha => Beau.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 7:50 AM
To: [EMAIL PROTECTED]
Subject: Total Newbie
Ok I am a total newbie whe
Gah!
bassackwards again :(
-Original Message-
From: LRMK [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 12:11
To: Yacketta, Ronald
Cc: [EMAIL PROTECTED]
Subject: Re: Difference between $count++ and ++$count
++$count will increment $count before it is used
$count++ will in
Ok I am a total newbie when it comes to perl. Could anyone please direct to
a site or something that will help me learn and start programing. Any help
would be great. Thanks.
++$count will increment $count before it is used
$count++ will increment $count after it is used
- Original Message -
From: "Yacketta, Ronald" <[EMAIL PROTECTED]>
To: "'Mystik Gotan'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, December 06, 2002 11:02 PM
Subject: RE: Differ
It was a trailing space in $_ that was getting me. I changed a chomp
to a chop and it now finds the string.
Thanx for the tip, and the code!
-Michael
>>> "Patel, SamirX K" <[EMAIL PROTECTED]> 12/05/02 05:08PM >>>
Could there be extra, non-visible characters attached to the subject
coming
back?
Yes sir there is! And it's quite a goober if you ask me, but very useful.
I'll show the difference by example.
my $SOME_CONSTANT = 2; # NO MAGIC NUMBERS! (hehe)
my $pre_increment = 0;
my $post_increment = 0;
my $pre_result = ++$pre_increment + $SOME_CONSTANT;
my $post_result = $post_i
On Friday 06 December 2002 11:09 am, simran wrote:
> Yup...
>
> In program 1 you will get $i to be 1 and then $count will be set to 2
> In program 2 you will get $count to be set to 2 and then assigned to $i
> so now $i will also be 2.
>
> Its just a prcedence thing...
>
> Program 1
> --
dont usehtml file for http://www.mydomain.com/welcome.html
use a cgi
like http://www.mydomain.com/welcome.pl
when u passing user to the page don't just redirect
load that page using automated form submit so you can pass the password and
username to that page too and validate there
if it is wrong r
dont usehtml file for http://www.mydomain.com/welcome.html
use a cgi
like http://www.mydomain.com/welcome.pl
when u passing user to the page don't just redirect
load that page using automated form submit so you can pass the password and
username to that page too and validate there
if it is wrong
$count++ - will display value then add
++$count - will add then display
as in where $count = 5;
printf "%5d\n", $count++ ;
would display 5 and $count would be 6
printf "%5d\n", ++$count ;
would add then display 6
Yup...
In program 1 you will get $i to be 1 and then $count will be set to 2
In program 2 you will get $count to be set to 2 and then assigned to $i
so now $i will also be 2.
Its just a prcedence thing...
Program 1
--
my $count = 1;
my $i = $count++;
print "$i\n";
Program 2
Yes it is a differense.
code:
#!/usr/bin/perl -w
use strict;
my $hepp = 3;
my $hopp;
$hopp =++$hepp;
print "hopp: $hopp\n";
$hepp = 3;
$hopp = $hepp++;
print "hopp: $hopp\n";
Mystik Gotan wrote:
>
> Hiya,
>
> is there any difference between $count++ and ++$count?
> Just wondering.
>
>
Yes $count++ is incremented afterwards where ++$count is incremented
first
$a=1
C$=++a$ #c$ gets 2
C$=a$++ #c$ gets 1 and then a$ is increment to 2
Print "$c $a" #returns "1 2".
Paul
> -Original Message-
> From: Mystik Gotan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11
Yes
If I recall correctly:
++$count will increment $count after it is used
$count++ will increment $count before it is used
-Ron
-Original Message-
From: Mystik Gotan [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 11:54
To: [EMAIL PROTECTED]
Subject: Difference between $coun
Hiya,
is there any difference between $count++ and ++$count?
Just wondering.
Thanks.
_
Ontvang je Hotmail & Messenger berichten op je mobiele telefoon met Hotmail
SMS http://www.msn.nl/jumppage/
--
To unsubscribe, e-mail: [EM
To interate over something like:
$abc{'a1'}{'b1'} = $number1
$abc{'a2'}{'b2'} = $number2
$abc{'a3'}{'b3'} = $number3
$abc{'a4'}{'b4'} = $number4
...
You can use:
foreach my $key1 (keys %abc) {
foreach my $key2 (keys %{$abc{$key1}}) {
my $value = $abc{$key1}{$key2}
pri
Thank you!
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:45 AM
To: '[EMAIL PROTECTED]'; Beginners@perl. org (E-mail)
Subject: RE: Hash Question
> -Original Message-
> From: Sean Rowe [mailto:[EMAIL PROTECTED]]
> Sent: Friday,
That sounds more like what I want to do. I have a question, though: Since
I'm not going to know before hand what my hash values are (as I create them
on the fly), how can I iterate through each hash to get each value?
-Original Message-
From: Igor Sutton Lopes [mailto:[EMAIL PROTECTED]]
> -Original Message-
> From: Sean Rowe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 9:30 AM
> To: Beginners@perl. org (E-mail)
> Subject: Hash Question
>
>
> I need to keep track of a user, all the web pages a user has
> visited, and
> the number of times the user visited
I'm not very sure if it works.
I'd rather concentate the whole thing.
$Hash{"User"} = $ANumber;
$Hash{"Page"} .= $ANumber;
$Hash{"NumTimesVisited"} .= $ANumber;
Also note that you should be using $ in your HashKey calls!
--
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
I need to keep track of a user, all the web pages a user has visited, and
the number of times the user visited each page. I get my information from a
log file. Here's how I would like to say it programmatically:
$Hash{"$User"}{"$Page"}{"$NumTimesVisited"} = $ANumber;
Is this possible?
perldoc perlrun
On Fri, 2002-12-06 at 22:39, Tom Allison wrote:
> simran wrote:
> >>From the docs...
> >
> >
> > -S makes perl use the PATH environment variable to search
> >
> >
> >
> >
> > On Fri, 2002-12-06 at 12:49, Tom Allison wrote:
> >
> >>eval 'exec /usr/bin/perl -S $0 ${1+"$@
simran wrote:
From the docs...
-S makes perl use the PATH environment variable to search
for the script (unless the name of the script starts
with a slash). Typically this is used to emulate #!
startup on machines that don't support #!, in the fol-
On Thu, 5 Dec 2002 14:24:03 -0500, [EMAIL PROTECTED] (Paul Kraus)
wrote:
>>snip "How to seek last 2k?"
Here's a start for you, getting the last 2k of the file.
Looping and checking for last page break is left up to you. :-)
#!/usr/bin/perl -w
use strict;
my $filename = shift or die "Usage: $0 f
71 matches
Mail list logo