Re: How to get this hash?

2005-11-16 Thread John W. Krahn
Jeff Pang wrote:
> Hi,lists,

Hello,

> I have a file that look as:
> 
> --
> User: honorhr40
> Got data from YY23 (md1=23,md2=24):
> [0] =46[I:0 T:Int]
> [1] pd=[I:0 T:Str]
> [2] cosnm=normal[I:0 T:Str]
> --
> User: lulu-918
> Got data from YY18 (md1=18,md2=19):
> [0] =69[I:0 T:Int]
> [1] pd=back.zzz.com[I:0 T:Str]
> [2] cosnm=normal[I:0 T:Str]
> 
> ..
> 
> and thousands of these lines.
> 
> I want to get the No.1 line and No.5 line,just as:
> 
> User: honorhr40
> [2] cosnm=normal[I:0 T:Str]
> 
> and put the two lines into a hash,as:
> 
> $hash{'honorhr40'} = 'normal';
> 
> I have no ideas on doing this work.Can you anyone give me some help?thanks.

This appears to do what you want:

#!/usr/bin/perl
use warnings;
use strict;
use Data::Dumper;

$/ = "--\n";

my %hash;

while (  ) {

next unless /^User:\s*(.+?)$(?=.*=([^[]+)\[)/sm;

$hash{ $1 } = $2
}

print Dumper \%hash;

__DATA__

--
User: honorhr40
Got data from YY23 (md1=23,md2=24):
[0] =46[I:0 T:Int]
[1] pd=[I:0 T:Str]
[2] cosnm=normal[I:0 T:Str]
--
User: lulu-918
Got data from YY18 (md1=18,md2=19):
[0] =69[I:0 T:Int]
[1] pd=back.zzz.com[I:0 T:Str]
[2] cosnm=normal[I:0 T:Str]



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: New on Mail::Send

2005-11-16 Thread Thomas Bätzler
ZHAO, BING <[EMAIL PROTECTED]> presumed:
>   I am on Windows XP home edition. I have this 
> software Secure Shell which tunnels to a remote host(unix). 
> The remote is very strictly managed, any installation of 
> anything would require me to talk to/call up the system 
> administator(this is national security). Then I have this 
> home-made module directory, just a dir with lots of *.pm 
> files, I have got away without actually downloading any 
> module for a while. ( I usually just copy and paste the raw 
> source code and save it under my module dir)

Wow, your sysadmin is gonna love this - they set up all of
those security precautions and some nerd student actually
goes out of his way to bypass them. Way to go!

[...]

> Any CONSTRUCTIVE suggestion on how I should modify my code?

No, but a constructive suggestion on how to improve your
chances of actually getting help: don't insult the people
you want help from.

HTH,
Thomas

PS: A nastier person than me would've notified [EMAIL PROTECTED]
of your antics.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Query on databases

2005-11-16 Thread Gayatri
Thanks,
I downloaded DBD::mysql from
http://search.cpan.org/search?m=module&q=DBD%3A%3A&s=61 and DBIx::Easy from
http://search.cpan.org/search?m=module&q=DBIx%3A%3A&s=31 modules.
But the installation guide doesnt work as spcified. Wht do i do?
Im using Windows platform and Perl 5.8.6

Regards,
Gayatri

- Original Message -
From: "Michael David" <[EMAIL PROTECTED]>
To: "Gayatri" <[EMAIL PROTECTED]>; 
Sent: Wednesday, November 16, 2005 9:58 AM
Subject: Re: Query on databases


>
> >- Original Message -
> >From: "Gayatri" <[EMAIL PROTECTED]>
> >To: 
> >Sent: Wednesday, November 16, 2005 2:39 PM
> >Subject: Query on databases
>
>
> >Hi all,
> >Im a beginner in databases.
> >Can you please let me know which DBD and DBI is required if I m using
MySQL
> >database.
>
> >I tried using
> >use DB_File;
>
> >It throws error as follows.
> >Can't locate DB_File.pm in @INC (@INC contains: C:/Perl/lib
> >C:/Perl/site/lib .)
>
> >Please tell me what is missing.
>
> I would say that what is missing is DB_File.pm, as it can not be located
>
> use DBI; (acual syntax to use it)
> its easy to use
> and a quick search on CPAN for 'DBI' will tell you everything you need to
> know
> http://search.cpan.org/~timb/DBI-1.48/DBI.pm
>
>
> >Thanks,
> >Gayatri.
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




How to get this hash?

2005-11-16 Thread Jeff Pang
Hi,lists,

I have a file that look as:

--
User: honorhr40
Got data from YY23 (md1=23,md2=24):
[0] =46[I:0 T:Int]
[1] pd=[I:0 T:Str]
[2] cosnm=normal[I:0 T:Str]
--
User: lulu-918
Got data from YY18 (md1=18,md2=19):
[0] =69[I:0 T:Int]
[1] pd=back.zzz.com[I:0 T:Str]
[2] cosnm=normal[I:0 T:Str]

..

and thousands of these lines.

I want to get the No.1 line and No.5 line,just as:

User: honorhr40
[2] cosnm=normal[I:0 T:Str]

and put the two lines into a hash,as:

$hash{'honorhr40'} = 'normal';

I have no ideas on doing this work.Can you anyone give me some help?thanks.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




New on Mail::Send

2005-11-16 Thread ZHAO, BING
 I am on Windows XP home edition. I have this software Secure Shell which tunnels to 
a remote host(unix). The remote is very strictly managed, any installation of anything would 
require me to talk to/call up the system administator(this is national security). Then I have this 
home-made module directory, just a dir with lots of *.pm files, I have got away without actually 
downloading any module for a while. ( I usually just copy and paste the raw source code and save 
it under my module dir)
 Any 'make install' would result in Error. Since what I am doing is relatively 
simple, I just dug out the required module from the MailTools-1.67/, like Mail::Send, Mail::Mailer 
etc and save them into my secret home-made module dir and set path to it.



 STOP: any suggestion for me on how to install modules correctly or any doubt for me 
on if I really want to learn to install modules, plz stop. I appreciate your eagerness to show off 
your seniority. And stop making assumption, as I just stated case clear enough. And when it comes 
down to learning/study, very few people could match my intensity.
 
 My point again: I am a perl beginner. I don't care how the perl is developing and 
where perl is going. I am doing stuff way fancier than what you can imagine. I am current doing a 
project with web input and data anaylysis and email feedback. I need to do them and not to think 
why and how perl is like this, why and how perl module works this way. As long as it works, I am 
happy and I am making progress. If the purpose of being on this list is to ask questions and help 
each other out, I am in for it.

I have enough 'living-a-pumped-up-life' phylosophies from my 5,000-year 
cultural heritages.


 Here is my script:

require Mail::Send;
$msg = new Mail::Send;
$msg = new Mail::Send Subject=>'example subject', To=>'Bing Zhao';
$msg->to('[EMAIL PROTECTED]');
$msg->subject('example subject');
$msg->cc('[EMAIL PROTECTED]');
$fh = $msg->open;
print $fh "Body of message";
$fh->close;


With no error regarding the whereabout of the necessary modules, I assume I got the module thing 
right. Then every time, this 'dead.letter' is generated. I guess it's part of the built-in 
function of Mail::Send, when the script fails to send the email. Anyway, here is a copy of the 
dead.letter files:


From bzhao Wed Nov 16 12:13:15 2005
Return-Path: 
Received: (from [EMAIL PROTECTED])
by gly.lbl.gov (8.12.11/8.12.11/Submit) id jAGKDFRT011092;
Wed, 16 Nov 2005 12:13:15 -0800
Date: Wed, 16 Nov 2005 12:13:15 -0800
From: bing zhao 
Message-Id: <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: example subject
To: [EMAIL PROTECTED]
 
Body of message
 
Any CONSTRUCTIVE suggestion on how I should modify my code?


thanks a lot.

best,

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: cookies

2005-11-16 Thread S, karthik \(IE03x\)
Chappy,

 

   Thanks buddy. I got clarified with this issue. Yes, it is true that there 
are multiple documents convey multiple things. :-) . The information from your 
part is valuable to me. 

   

With Best Regards, 

Karthikeyan S 





From: Omega -1911 [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 1:15 AM
To: S, karthik (IE03x)
Cc: [EMAIL PROTECTED]; Perl Beginners List
Subject: Re: cookies

 

 

On 11/16/05, S, karthik (IE03x) <[EMAIL PROTECTED]> wrote:



I know that there are many template systems and modules available to implement 
it. I have experienced using sessions. That was easy too. But cookies behave 
differently. I need to understand the behavioral issues in cookies.





Now, let me put my doubt in other terms.



Please, look into the following code:





# animal is an existing cookie with value as 'lion'

my $animal = cookie('animal'); 

# now $animal gets 'lion'



# now assign 'tiger' to animal

my $cookiereplace = "Set-Cookie: animal = tiger;\n";

print $cookiereplace

# assignment done



my $animal_new = cookie('animal'); 



.

# Question : Now what does $animal_new contain?

.



print header;



my $animal_very_new = cookie('animal');



.

# Question : Also, what does $animal_very_new contain? 

.









-Original Message-
From: Chris Devers [mailto:[EMAIL PROTECTED]
Sent: Monday, November 14, 2005 8:36 PM
To: S, karthik (IE03x) 
Cc: Perl Beginners List
Subject: RE: cookies



On Mon, 14 Nov 2005, S, karthik (IE03x) wrote:



> my $username = 'name';

> my $cookiereplace = "Set-Cookie: username=$username; expires= \n"; 

> print $cookiereplace

>

> print header;

> 

> #print htmls

> 

>

> To unset the cookie :

>

> my $cookiereplace = "Set-Cookie: username='';"; 



Okay, that's a start, thank you.



Now, please, can you point out the documentation you were reading that

led you to believe that this would do anything useful?



I have a hunch you may have mis-read something :-) 



Here's a hint: among a great many other ways to do this, the CGI.pm

module has built-in methods to handle this for you. Look up for the

cookie sections of the CGI perldoc; an online version is here: 



http://perldoc.perl.org/CGI.html#HTTP-COOKIES



Additionally, higher-level modules like CGI::Application do a lot of the

work needed to make you forget that cookies are even necessary. 

Documentation on it is available at



http://search.cpan.org/~markstos/CGI-Application/lib/CGI/Application.pm



But if you just want to do things the old-fashioned way with raw

cookies, don't roll your own code to do this when it's a problem that

has been solved a hundred thousand times now -- just let CGI.pm do it. 





--

Chris Devers



^0%T [EMAIL PROTECTED]




Hello Karthikeyan S,

I think you understand how to set a "raw" cookie from what has been discussed 
so far. Your original question was how to set AND delete them.

To delete a cookie that has been set, simply set a cookie and for the 'expire' 
time, set it to a date that has passed already.

Also, I see a number of web sites that IMPROPERLY document cookies. When 
setting cookies, you should include the follow to ensure that your cookies are 
secure and behave properly (otherwise, the cookies set can be read by other 
sites, scripts, etc.):

Set-Cookie: name=$name; expires=date; path=$path_to_the_application 

(s)_that_are_allowed_to_modify_or_delete_the_cookie; 
domain=$your_web_site_address;

-Chappy

 



RE: cookies

2005-11-16 Thread S, karthik \(IE03x\)
Thanks buddy, I am clear with it now.


With Best Regards, 

Karthikeyan S 

-Original Message-
From: JupiterHost.Net [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 11:42 PM
To: beginners@perl.org
Subject: Re: cookies

Hello,

> # animal is an existing cookie with value as 'lion'
> 
> my $animal = cookie('animal'); 
> 
> # now $animal gets 'lion'
> 
>  
> 
> # now assign 'tiger' to animal 
> 
> my $cookiereplace = "Set-Cookie: animal = tiger;\n"; 
> 
> print $cookiereplace
> 
> # assignment done
> 
>  
> 
> my $animal_new = cookie('animal'); 
>  
> 
> .
> 
> # Question : Now what does $animal_new contain?

lion, because:

  1) you just gave the browser new stuff  but [did|could] not do 
anything to fetch the new data.

  2 you have not even done that yet since the header isn't fully sent...

> 
> .
> 
>  
> 
> print header;
> 
>  
> 
> my $animal_very_new = cookie('animal'); 
> 
>  
> 
> .
> 
> # Question : Also, what does $animal_very_new contain?

Same as above.

Search google for how cookies and HTTp headers work, its all independent

of what langauge you use to set_ and get_ the data...

Its how and when you fetch and send headers and what the webserver has 
forom your browser at what point.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: chomp and chop

2005-11-16 Thread Edward WIJAYA

On Thu, 17 Nov 2005 10:10:17 +0800, The Ghost <[EMAIL PROTECTED]> wrote:

I have some code that chomps a variable, but the variable still seems to  
have a newline.  But if I chop it I am rid of the newline.  What's going  
on with that string?





Perhaps that newline is Windows specific (like \r).

To view the hidden string you can use this
command: cat -A filename.txt

Then in Perl you can remove them using regex:
 sub remove_trailing_newline {
$_[0] =~ s/[\r\n]+\Z//;
}

Hope that helps.

--
Regards,
Edward WIJAYA
SINGAPORE

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




chomp and chop

2005-11-16 Thread The Ghost
I have some code that chomps a variable, but the variable still seems  
to have a newline.  But if I chop it I am rid of the newline.  What's  
going on with that string?


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: refs and variables

2005-11-16 Thread Steve Bertrand
 

> -Original Message-
> From: The Ghost [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 16, 2005 8:00 PM
> To: Perl Beginners
> Subject: refs and variables
> 
> my %hash = (
>   foo => 'bar'
>   );
> my $name='hash';
> my $key='foo';
> 
> print $name{$key};
> 
> how can I get that to print "bar"?

Like this:
#!/usr/bin/perl -w

use strict;

my %hash = (
foo => 'bar'
);  

print $hash{'foo'};  


...for the quick way. What you tried to do is assign the string 'hash'
to a scalar named $name. This is certainly what you didn't want.

A great book that deals with this is 'Perl Objects, References &
Modules', which subsequently I have on my desk at all times. I can't
remember the author though ;)

Steve

Steve


> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED] For 
> additional commands, e-mail: [EMAIL PROTECTED] 
>  
> 
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: refs and variables

2005-11-16 Thread Bob Showalter

The Ghost wrote:

my %hash = (
foo => 'bar'
);
my $name='hash';
my $key='foo';

print $name{$key};

how can I get that to print "bar"?


You can't, given the way you've set up %hash and $name. You're trying to 
take a "soft" reference to a lexical variable, which won't work.


(well, you could so something extremely cheesy like:

   print "key=", eval "\$$name\{$key}";

but yecch, don't to that)

You can do this:

   use strict;
   my %hash = ( foo => 'bar' );
   my $name = \%hash;
   my $key = 'foo';
   print $name->{$key};

Or you could do this (but don't!):

   use strict;
   our %hash = ( foo => 'bar' );
   my $name = 'hash';
   my $key = 'foo';
   no strict 'refs';
   print $name->{$key};

Usually, if you're trying to use a string (perhaps coming from the 
outside world) as a symbol name, you're better off using a hash instead:


   my %data = (
   'hash1' => { foo => 'bar' },
   'hash2' => { foo => 'qux' },
   );

   for my $name (qw(hash1 hash2)) {
  print $data{$name}{foo};
   }

If the string isn't coming from the outside world and you just need a 
reference, use a proper reference (\%hash)


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




refs and variables

2005-11-16 Thread The Ghost

my %hash = (
foo => 'bar'
);
my $name='hash';
my $key='foo';

print $name{$key};

how can I get that to print "bar"?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Complex Array Regex

2005-11-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Kevin Old wrote:
> Hello everyone,
> 
> I've inherited some code and ran across a subroutine that has a regex
> in it that I can't seem to figure out how it works, or how to look up
> this type of regex to learn more about them.
> 
> sub fetch_cookie {
> my $self = shift;
> my $cookie_name = shift;
> my $cookies = $self->{R}->header_in('Cookie');
> =pod
> Here is the value that $cookies is set to.
> PT=MTEzMTA2NzA3NDpXbVdjaGU5aVoxWHR1WUNwWXJXN2ZR;
> AT=MzQ4NTA2NTozOkpRamR2ZFNVTWw2; name=Kevin%20Old;
> U=xWmEmtTZY4SO1qV+IiYWddiqh3k; CP=null*
> =cut
> return 0 unless $cookies;
> if (my $cookie = ($cookies =~ m/$cookie_name=([^\s;]+)/)[0]) {
The [^\s;]+ is a character class. The ^ is negative. So it grabs 
charscters until either white space or a semi-colon is hit.

Wags ;)
> return $cookie;
> }
> return 0;
> }
> 
> It seems to be looping through each cookie, even though it's a string.
>  The part that really throws me off is the character class [^\s;].  In
> the string of cookies above the space is clearly after the semicolon.
> 
> Just wondering if anyone can shed some light on this.
> 
> Any help is appreciated!
> 
> Kevin
> --
> Kevin Old
> [EMAIL PROTECTED]



***
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
***


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Complex Array Regex

2005-11-16 Thread Kevin Old
Hello everyone,

I've inherited some code and ran across a subroutine that has a regex
in it that I can't seem to figure out how it works, or how to look up
this type of regex to learn more about them.

sub fetch_cookie {
my $self = shift;
my $cookie_name = shift;
my $cookies = $self->{R}->header_in('Cookie');
=pod
Here is the value that $cookies is set to.
PT=MTEzMTA2NzA3NDpXbVdjaGU5aVoxWHR1WUNwWXJXN2ZR;
AT=MzQ4NTA2NTozOkpRamR2ZFNVTWw2; name=Kevin%20Old;
U=xWmEmtTZY4SO1qV+IiYWddiqh3k; CP=null*
=cut
return 0 unless $cookies;
if (my $cookie = ($cookies =~ m/$cookie_name=([^\s;]+)/)[0]) {
return $cookie;
}
return 0;
}

It seems to be looping through each cookie, even though it's a string.
 The part that really throws me off is the character class [^\s;].  In
the string of cookies above the space is clearly after the semicolon.

Just wondering if anyone can shed some light on this.

Any help is appreciated!

Kevin
--
Kevin Old
[EMAIL PROTECTED]

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: regex

2005-11-16 Thread Jay Savage
On 11/16/05, Gerard Robin <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 16, 2005 at 05:17:29AM -0800 John W. Krahn wrote:
>
> > The first one should be faster.  Of course you could use the Benchmark 
> > module
> > to find out for sure.
>
> Thanks for your help.
>
> I tried Benchmark but the results seem not reliable:
>
> cmpthese( -5, { a => sub{$x*$x}, b => sub{$x**2} } );
>
> outputs:
>Rateba
> b 3858660/s   -- -19%
> a 4757428/s  23%   --
>
>
> cmpthese( -5, { a => sub{$x**2}, b => sub{$x*$x} } );
>
> outputs:
>Rateba
> b 4401295/s   -- -14%
> a 5141629/s  17%   --
>
> perhaps I missed something ?
>

can we see the rest of your code? Where are you declaring $x? Try
using two variables with the same starting value. Or reset the value
on each iteration. Otherwise the second routine to execute is
multiplying much, much larger numbers because the value is squared on
each iteration:

my $x = 2;
my $y = 2;
cmpthese( -5, { a => sub{$x**2}, b => sub{$y*$y} } );

or

my $x = 2;
cmpthese( -5, { a => sub{$x**2; $x = 2}, b => sub{$x*$x; $x = 2} } );

-- jay
--
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!


Re: regex

2005-11-16 Thread Gerard Robin
On Wed, Nov 16, 2005 at 05:17:29AM -0800 John W. Krahn wrote:
 
> The first one should be faster.  Of course you could use the Benchmark module
> to find out for sure.

Thanks for your help.
 
I tried Benchmark but the results seem not reliable:

cmpthese( -5, { a => sub{$x*$x}, b => sub{$x**2} } );

outputs:
   Rateba
b 3858660/s   -- -19%
a 4757428/s  23%   --


cmpthese( -5, { a => sub{$x**2}, b => sub{$x*$x} } );

outputs:
   Rateba
b 4401295/s   -- -14%
a 5141629/s  17%   --

perhaps I missed something ?

-- 
Gérard


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: about regex

2005-11-16 Thread Rafael Morales
Thanks to Elie, Jay and Shawn, all work fine, but I used the Jay solution. What 
I was using is:

#!/usr/bin/perl

  use strict;
  use warnings;

$/ = "";
my $file = "111505_SystemOut_1.log";
open ( FILE, "<$file" ) || die "El nombre de archivo es incorrecto o no 
existe\n$!\n";

while ( my $lines =  ) {

if ( $lines =~ /(.+\n)(.+\n)(.+:-1)/  ) {

print "$1";
print "$2";
print "$3";

}

}

But it does not work.


Thanks again 

-- 
___
Get your free email from http://mymail.bsdmail.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: follow-up questions on Mail::Send

2005-11-16 Thread Ryan Frantz


> -Original Message-
> From: ZHAO, BING [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 4:09 PM
> To: beginners@perl.org
> Subject: Re: follow-up questions on Mail::Send
> 
> Oh, I indeed did what you'll just told me to do:
> 1. I first downloaded this MailTools-1.67.tar.gz
> 2. ungziped it
> 3. cd MailTools-1.67
> 4. Moreed Readme, followed the instructions, until the last step,
"make
> install" failed, still
> lots of files including a lib/ were generated.
> 5. Tried to run my file. Error! Followed the error message, step by
step,
> (errors mostly are
> "can't find Send.pm" etc), that's how I went into the Mailtoos-1.67
> =>lib=>Mail. to get the
> Send.pm and saved it in my current directory.
> 6. Then it finally seemed to be working. But got stuck, a dead.letter
is
> generated every time. No
> email was sent whatsoever.

We need to back up a bit.  What OS are you running on?  As I stated in
an earlier reply, Mail::Send requires access to a mail client (such as
mail or mailx on *NIX system).  If you're running on a Windows system,
that's a whole other ball game.  Please provide your OS specifics and
the entire script that you wrote.


> 
> I am just perl beginner and doing bioperl most of time and it would
cost
> me 6 months at least to
> read the Camel book. Then I would understand what the modules really
are
> saying. I don't believe
> anyone cares how the modules are coded, just trying to get them to
work in
> your script. That's
> exactly what I am doing. And no, it didn't work.  help me and tell me
what
> I did was wrong. Tell
> you the truth, I don't understand how the Mail::Send is coded, nor I
> believe many of people in
> this list do, nor anyone in this list cares how Mail::Send is coded.

Be careful when making assumptions and sweeping statements. ;)  From my
experience, many Perlers in fact do like to know how things work under
the hood.  I for one would like to write a module of my own one day;
reading through a module's code helps me to understand how to go about
doing that.

ry

> 
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  
> 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: "Linked Lists" in Perl

2005-11-16 Thread Jay Savage
On 11/16/05, Shawn Corey <[EMAIL PROTECTED]> wrote:

[snipped misinformation]

Shawn,

I'm not sure where you're headed with this (I didn't see the question
it is in reply to) but take another look at perlfaq4.

Linked lists are normally implemented in Perl as hasrefs, and
described adequately in perlfaq4 ('how do I handle linked lists?'), as
well as perldsc and perltoot and _Mastering Algorithms with Perl_,
which is IMO a must read for anyone thinking about manipulating
complex and possibly recursive data structures.

If you are having a specific issue with linked lists, please provide
the code you're working on as requested in the mailing list FAQ.

Your post is simply listing the standard array functions and
operators. There is nothing linked about the data manipulated by these
functions, as each item is a simple scalar and contains no information
about the preceding and following items.

Also please see perldoc -q 'what is the difference between a list and
an array'. You seem to be confusing the two. '@list' is not a list; it
is an array.

HTH

--j
--
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!


Re: follow-up questions on Mail::Send

2005-11-16 Thread Bob Showalter

ZHAO, BING wrote:

Oh, I indeed did what you'll just told me to do:
1. I first downloaded this MailTools-1.67.tar.gz
2. ungziped it
3. cd MailTools-1.67
4. Moreed Readme, followed the instructions, until the last step, "make 
install" failed, still lots of files including a lib/ were generated.


Are you on Unix? I'm assuming you are.

You need to run "make install" as root. If you don't have root access, 
you need to read the following:


   perldoc -q 'How do I keep my own module/library directory?'

I am just perl beginner and doing bioperl most of time and it would cost 
me 6 months at least to read the Camel book. Then I would understand 
what the modules really are saying. I don't believe anyone cares how the 
modules are coded, just trying to get them to work in your script. 
That's exactly what I am doing. And no, it didn't work.  help me and 
tell me what I did was wrong. Tell you the truth, I don't understand how 
the Mail::Send is coded, nor I believe many of people in this list do, 
nor anyone in this list cares how Mail::Send is coded.


What you're doing wrong is failing to learn how to properly install 
modules. You'll save yourself a lot of headaches if you get this process 
down pat.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: follow-up questions on Mail::Send

2005-11-16 Thread ZHAO, BING

Oh, I indeed did what you'll just told me to do:
1. I first downloaded this MailTools-1.67.tar.gz
2. ungziped it
3. cd MailTools-1.67
4. Moreed Readme, followed the instructions, until the last step, "make install" failed, still 
lots of files including a lib/ were generated.
5. Tried to run my file. Error! Followed the error message, step by step, (errors mostly are 
"can't find Send.pm" etc), that's how I went into the Mailtoos-1.67 =>lib=>Mail. to get the 
Send.pm and saved it in my current directory.
6. Then it finally seemed to be working. But got stuck, a dead.letter is generated every time. No 
email was sent whatsoever.


I am just perl beginner and doing bioperl most of time and it would cost me 6 months at least to 
read the Camel book. Then I would understand what the modules really are saying. I don't believe 
anyone cares how the modules are coded, just trying to get them to work in your script. That's 
exactly what I am doing. And no, it didn't work.  help me and tell me what I did was wrong. Tell 
you the truth, I don't understand how the Mail::Send is coded, nor I believe many of people in 
this list do, nor anyone in this list cares how Mail::Send is coded.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: follow-up questions on Mail::Send

2005-11-16 Thread Ryan Frantz


> -Original Message-
> From: ZHAO, BING [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 16, 2005 3:26 PM
> To: beginners@perl.org
> Subject: follow-up questions on Mail::Send
> 
> Hi,
> I have used small single package named as X.pm
before,
> never big ones. But for
> Mail::Send, I downloaded this huge file MailTools-1.67. I dug several
> modules out like Send.pm,
> Mailer.pm etc and saved them in the current directory.
> Tried to run my file, but got this dead.letter
generated:
> 
>  From bzhao Wed Nov 16 12:13:15 2005
> Return-Path: 
> Received: (from [EMAIL PROTECTED])
>  by gly.lbl.gov (8.12.11/8.12.11/Submit) id jAGKDFRT011092;
>  Wed, 16 Nov 2005 12:13:15 -0800
> Date: Wed, 16 Nov 2005 12:13:15 -0800
> From: bing zhao 
> Message-Id: <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: example subject
> To: [EMAIL PROTECTED]
> 
> Body of message
> 
>

**
> *
> CONTENT OF MY runMail.pl:
> 
> 
> require Mail::Send;
> 
> $msg = new Mail::Send;
> 
> $msg = new Mail::Send Subject=>'example subject', To=>'Bing Zhao';
> 
> $msg->to('[EMAIL PROTECTED]');
> #$msg->to('[EMAIL PROTECTED]', '[EMAIL PROTECTED]');
> $msg->subject('example subject');
> $msg->cc('[EMAIL PROTECTED]');
> #$msg->bcc('[EMAIL PROTECTED]');
> 
> #$msg->set($header, @values);
> #$msg->add($header, @values);
> #$msg->delete($header);
> 
>  # Launch mailer and set headers. The filehandle returned
>  # by open() is an instance of the Mail::Mailer class.
>  # Arguments to the open() method are passed to the Mail::Mailer
>  # constructor.
> 
> $fh = $msg->open;   # some default mailer
>  # $fh = $msg->open('sendmail'); # explicit
> 
> print $fh "Body of message";
> 
> $fh->close; # complete the message and send it
> 
> #$fh->cancel;# not yet implemented
> 
> 
> 
> 
> Just copied and pasted from the Mail::Send synopsis and made minor
> modifications. Don't know what
> was wrong. Not really trying to understand how it worked, just want to
be

Learning a little never hurts.

> able to send a HTML link
> to others. Say, To : [EMAIL PROTECTED]Subject: Hello,
there!
> Message:
> www.berkeley.edu
> That's all I have been dreaming for. Help me!!

The simplest way to install a module is to use the appropriate package
manager.  If you're running *NIX, that would be 'cpan'; if you're
running Windows (ActiveState Perl), use 'ppm'.  Follow the relevant docs
for installing modules.  You can install from source if you want, but
you need to know what you're doing (i.e. know where Perl looks for
modules).

ry

> 
> thanks,
> 
> best,
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  
> 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: follow-up questions on Mail::Send

2005-11-16 Thread Bob Showalter

ZHAO, BING wrote:
But for Mail::Send, I downloaded this huge file 
MailTools-1.67. I dug several modules out like Send.pm, Mailer.pm etc 
and saved them in the current directory.


Well, that's not how you install modules. Read the README inside the
MailTools tarball. And read perldoc perlmodinstall.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




follow-up questions on Mail::Send

2005-11-16 Thread ZHAO, BING

Hi,
   I have used small single package named as X.pm before, never big ones. But for 
Mail::Send, I downloaded this huge file MailTools-1.67. I dug several modules out like Send.pm, 
Mailer.pm etc and saved them in the current directory.

   Tried to run my file, but got this dead.letter generated:

From bzhao Wed Nov 16 12:13:15 2005
Return-Path: 
Received: (from [EMAIL PROTECTED])
by gly.lbl.gov (8.12.11/8.12.11/Submit) id jAGKDFRT011092;
Wed, 16 Nov 2005 12:13:15 -0800
Date: Wed, 16 Nov 2005 12:13:15 -0800
From: bing zhao 
Message-Id: <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: example subject
To: [EMAIL PROTECTED]
 
Body of message
 
***

CONTENT OF MY runMail.pl:


require Mail::Send;
 
$msg = new Mail::Send;
 
$msg = new Mail::Send Subject=>'example subject', To=>'Bing Zhao';
 
$msg->to('[EMAIL PROTECTED]');

#$msg->to('[EMAIL PROTECTED]', '[EMAIL PROTECTED]');
$msg->subject('example subject');
$msg->cc('[EMAIL PROTECTED]');
#$msg->bcc('[EMAIL PROTECTED]');
 
#$msg->set($header, @values);

#$msg->add($header, @values);
#$msg->delete($header);
 
# Launch mailer and set headers. The filehandle returned

# by open() is an instance of the Mail::Mailer class.
# Arguments to the open() method are passed to the Mail::Mailer
# constructor.
 
$fh = $msg->open;   # some default mailer

# $fh = $msg->open('sendmail'); # explicit
 
print $fh "Body of message";
 
$fh->close; # complete the message and send it
 
#$fh->cancel;# not yet implemented
 




Just copied and pasted from the Mail::Send synopsis and made minor modifications. Don't know what 
was wrong. Not really trying to understand how it worked, just want to be able to send a HTML link 
to others. Say, To : [EMAIL PROTECTED]Subject: Hello, there!Message: 
www.berkeley.edu

That's all I have been dreaming for. Help me!!

thanks,

best,

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: How to do dos2unix for entire directory

2005-11-16 Thread Bob Showalter

Santosh Reddy wrote:


I want to convert all the files which are in dos format to UNIX format.


perl -pi -e 's/\cM$//' *

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: cookies

2005-11-16 Thread Omega -1911
On 11/16/05, S, karthik (IE03x) <[EMAIL PROTECTED]> wrote:
>
>
>
> I know that there are many template systems and modules available to
> implement it. I have experienced using sessions. That was easy too. But
> cookies behave differently. I need to understand the behavioral issues in
> cookies.
>
>
>
>
>
> Now, let me put my doubt in other terms.
>
>
>
> Please, look into the following code:
>
>
>
>
>
> # animal is an existing cookie with value as 'lion'
>
> my $animal = cookie('animal');
>
> # now $animal gets 'lion'
>
>
>
> # now assign 'tiger' to animal
>
> my $cookiereplace = "Set-Cookie: animal = tiger;\n";
>
> print $cookiereplace
>
> # assignment done
>
>
>
> my $animal_new = cookie('animal');
>
>
>
> .
>
> # Question : Now what does $animal_new contain?
>
> .
>
>
>
> print header;
>
>
>
> my $animal_very_new = cookie('animal');
>
>
>
> .
>
> # Question : Also, what does $animal_very_new contain?
>
> .
>
>
>
>
>
>
>
>
>
> -Original Message-
> From: Chris Devers [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 14, 2005 8:36 PM
> To: S, karthik (IE03x)
> Cc: Perl Beginners List
> Subject: RE: cookies
>
>
>
> On Mon, 14 Nov 2005, S, karthik (IE03x) wrote:
>
>
>
> > my $username = 'name';
>
> > my $cookiereplace = "Set-Cookie: username=$username; expires= \n";
>
> > print $cookiereplace
>
> >
>
> > print header;
>
> > 
>
> > #print htmls
>
> > 
>
> >
>
> > To unset the cookie :
>
> >
>
> > my $cookiereplace = "Set-Cookie: username='';";
>
>
>
> Okay, that's a start, thank you.
>
>
>
> Now, please, can you point out the documentation you were reading that
>
> led you to believe that this would do anything useful?
>
>
>
> I have a hunch you may have mis-read something :-)
>
>
>
> Here's a hint: among a great many other ways to do this, the CGI.pm
>
> module has built-in methods to handle this for you. Look up for the
>
> cookie sections of the CGI perldoc; an online version is here:
>
>
>
> http://perldoc.perl.org/CGI.html#HTTP-COOKIES
>
>
>
> Additionally, higher-level modules like CGI::Application do a lot of the
>
> work needed to make you forget that cookies are even necessary.
>
> Documentation on it is available at
>
>
>
> http://search.cpan.org/~markstos/CGI-Application/lib/CGI/Application.pm
>
>
>
> But if you just want to do things the old-fashioned way with raw
>
> cookies, don't roll your own code to do this when it's a problem that
>
> has been solved a hundred thousand times now -- just let CGI.pm do it.
>
>
>
>
>
> --
>
> Chris Devers
>
>
>
> ^0%T [EMAIL PROTECTED]
>
>
>
Hello Karthikeyan S,

I think you understand how to set a "raw" cookie from what has been
discussed so far. Your original question was how to set AND delete them.

To delete a cookie that has been set, simply set a cookie and for the
'expire' time, set it to a date that has passed already.

Also, I see a number of web sites that IMPROPERLY document cookies. When
setting cookies, you should include the follow to ensure that your cookies
are secure and behave properly (otherwise, the cookies set can be read by
other sites, scripts, etc.):

Set-Cookie: name=$name; expires=date; path=$path_to_the_application
(s)_that_are_allowed_to_modify_or_delete_the_cookie;
domain=$your_web_site_address;

-Chappy


Re: combining array ref's

2005-11-16 Thread Dave Gray
On 11/13/05, Tom Allison <[EMAIL PROTECTED]> wrote:
> my $A = [1,2,3,4,5,6,7,8,9];
> my $B = [11,12,13,14,15,16,17,18,19];
>
> timethese(1000,
>  {
>  'plain' => 'my $array = [$A, $B];',
>  'loopy' => 'push @$A, $_ foreach @$B;'
>  });

Another important thing to notice is that John's benchmarks operate
entirely on temporary variables while the ones above modify the main
variables every single time, leading to a very large array in $A and
most likely not demonstrating the specific performance measurement
desired.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: How to do dos2unix for entire directory

2005-11-16 Thread Santosh Reddy
Hi Timothy,

Sorry to ask you but I am very much beginner in Perl. Can you please tell me
how to use this module?
Can you please give an example.

Thanks,
Santosh

-Original Message-
From: Timothy Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 12:35 AM
To: Santosh Reddy; Perl Beginners
Subject: RE: How to do dos2unix for entire directory


Check out the File::Find module.  It should come standard with your Perl
distribution.

-Original Message-
From: Santosh Reddy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 11:02 AM
To: 'Perl Beginners'
Subject: How to do dos2unix for entire directory

Hi All,

 

I want to convert all the files which are in dos format to UNIX format.
We
have the command in UNIX called dos2unix but it takes file as input. But
I
would like give a directory as an argument to the command and it should
convert all the dos files into UNIX format. And it should keep the UNIX
files as it is. In a dos file we have a ^M character at the end of each
line. We have to remove this character. Please send a sample code, if
you
can give full working code that is appreciated.

 

Thanks

Santosh.




___ 
Yahoo! Model Search 2005 - Find the next catwalk superstars - 
http://uk.news.yahoo.com/hot/model-search/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




"Linked Lists" in Perl

2005-11-16 Thread Shawn Corey


Handling linked lists in Perl is not the same as in C. You can emulate 
them with arrays and manipulate them by using Perl's array functions.



Create a list:   my @list = ();
Clear the list:  @list = ();
Add an $item:push @list, $item;
Remove an $item: $item = pop @list;
Add an $item to the other end:   unshift @list, $item;
Remove an $item from the other end:  $item = shift @list;
Get its size:$size = scalar( @list );
Retrieve the first $item:$item = $list[0];
Retrieve the last $item: $item = $list[-1];
Retrieve $n items from position $i:  @items = @list[ $i .. $i+$n-1 ];
Remove $n items from position $i:@items = splice( @list, $i, $n );
Insert @items at position $i:splice( @list, $i, 0, @items );
Reverse the list:@list = reverse @list;
Rotate the list: push @list, shift @list;
Reverse rotate the list: unshift @list, pop @list;


--

Just my 0.0002 million dollars worth,
   --- Shawn

"Probability is now one. Any problems that are left are your own."
   SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: having problems with index of a date string

2005-11-16 Thread Dave Gray
On 11/11/05, kathyjjja <[EMAIL PROTECTED]> wrote:
> I am trying to add the date to a file name.
[snip]

Usually when I want to do something like this, it's to make a uniquely
named temp file, so the date doesn't need to be human readable, so
something like this works just fine:

# filename__
my $tmpfile = '/var/tmp/prefix_'. $$ .'_'. time;

Just a thought. Simpler (than having to parse a string-formatted
date), which is always good.

Cheers,
Dave

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: about regex

2005-11-16 Thread Jay Savage
On 11/16/05, Rafael Morales <[EMAIL PROTECTED]> wrote:
> Hi list !!!
>
> This is my trouble, I have a file with this output:
>
> [11/14/05 22:52:10:130 GMT] 686b4b72 SystemOut O POST: 
> https://198.104.159.77/ssldocs/ws/xt_vm_transkods.alia?brand=KO-BR&person_id=14560115&password=teatro&trans_id=2&amount=10&trans_date=2005-11-14
>  20:52:10&trans_log=113200873013026&tp_Kodes=1
> [11/14/05 22:52:10:268 GMT] 686b4b72 SystemOut O RESP: 
> &ia_error=0&vm=60&in_auction=0&pc_count=6&
> [11/14/05 22:52:10:293 GMT] 686b4b72 SystemOut O ZIPCODE:1212
> [11/14/05 22:52:10:309 GMT] 686b4b72 SystemOut O WS:RedeemCode Params: 
> pincode='4DPJQFVCXLRNIA' redeem_date='2005-11-14 10:52:09' 
> person_id='14560115' brand='KO-BR' &js_error=0&vm=60&pc_count=6
> [11/14/05 22:52:10:377 GMT] 5636cb62 SystemOut O Algoritmo: H
> [11/14/05 22:52:10:378 GMT] 5636cb62 SystemOut O Semilla del nuevo 
> algoritmo:-1
>
>
> And my match is in last line (the :-1), but I need that line and the two 
> lines above. my question is how do I get that two lines above ???
>
> Regards and Thanks a lot !!!
>

Here's one way:

#!/usr/bin/perl
use warnings;
use strict;

my $data;

{
local $/;
$data = ;
}

my @matches = ($data =~ m/((?:.+?\n){2}.+:-1\n)/g);

foreach (@matches) {
my @lines = split /\n/;
print map {"$_\n"} @lines, "\n";
}

__END__
[11/14/05 22:52:10:130 GMT] 686b4b72 SystemOut O POST: \
https://198.104.159.77/ssldocs/ws/xt_vm_transkods.alia?brand=KO-BR\
   &person_id=14560115&password=teatro&trans_id=2&amount=10&trans_date\
=2005-11-14 20:52:10&trans_log=113200873013026&tp_Kodes=1
[11/14/05 22:52:10:268 GMT] 686b4b72 SystemOut O RESP: \
&ia_error=0&vm=60&in_auction=0&pc_count=6&
[11/14/05 22:52:10:293 GMT] 686b4b72 SystemOut O ZIPCODE:1212
[11/14/05 22:52:10:309 GMT] 686b4b72 SystemOut O WS:RedeemCode Params: \
pincode='4DPJQFVCXLRNIA' redeem_date='2005-11-14 1\
0:52:09' person_id='14560115' brand='KO-BR' &js_error=0&vm=60&pc_count=6
[11/14/05 22:52:10:377 GMT] 5636cb62 SystemOut O Algoritmo: H
[11/14/05 22:52:10:378 GMT] 5636cb62 SystemOut O Semilla del
nuevo algoritmo:-1

( '\' in data indicates long lines were broken for the email.)

Of course, if your data set is horribly large, you may not want to slurp it.

HTH

-- jay
--
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!


RE: How to do dos2unix for entire directory

2005-11-16 Thread Timothy Johnson

Check out the File::Find module.  It should come standard with your Perl
distribution.

-Original Message-
From: Santosh Reddy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 11:02 AM
To: 'Perl Beginners'
Subject: How to do dos2unix for entire directory

Hi All,

 

I want to convert all the files which are in dos format to UNIX format.
We
have the command in UNIX called dos2unix but it takes file as input. But
I
would like give a directory as an argument to the command and it should
convert all the dos files into UNIX format. And it should keep the UNIX
files as it is. In a dos file we have a ^M character at the end of each
line. We have to remove this character. Please send a sample code, if
you
can give full working code that is appreciated.

 

Thanks

Santosh.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




How to do dos2unix for entire directory

2005-11-16 Thread Santosh Reddy
Hi All,

 

I want to convert all the files which are in dos format to UNIX format. We
have the command in UNIX called dos2unix but it takes file as input. But I
would like give a directory as an argument to the command and it should
convert all the dos files into UNIX format. And it should keep the UNIX
files as it is. In a dos file we have a ^M character at the end of each
line. We have to remove this character. Please send a sample code, if you
can give full working code that is appreciated.

 

Thanks

Santosh.



Re: about regex

2005-11-16 Thread Shawn Corey

Elie De Brauwer wrote:
You could for example do that by buffering them. Following example reads 
from standard input. No that you should replace the regexp by something 
with more meaning in your context. This application also assumes that 
there will be at least three lines of input.


my $a=;
chomp $a;
my $b=;
chomp $b;
my $c=;
chomp $c;
while($c !~ /-1$/){
$a=$b;
$b=$c;
$c=;
chomp $c;
}
if($c =~ /-1$/){   
print "$a\n$b\n$c\n";

}else{
print "Not found\n";
}

hth
E.


You could keep a sliding list of lines:

#!/usr/bin/perl

use strict;
use warnings;

my $kept_lines = 3;
my @lines = ();

while( <> ){
  push @lines, $_;
  shift @lines if @lines > $kept_lines;
  chomp;
  if( /:-1$/ ){
print @lines;
  }
}

__END__



--

Just my 0.0002 million dollars worth,
   --- Shawn

"Probability is now one. Any problems that are left are your own."
   SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: about regex

2005-11-16 Thread Elie De Brauwer

Rafael Morales wrote:

Hi list !!!

This is my trouble, I have a file with this output:

[11/14/05 22:52:10:130 GMT] 686b4b72 SystemOut O POST: 
https://198.104.159.77/ssldocs/ws/xt_vm_transkods.alia?brand=KO-BR&person_id=14560115&password=teatro&trans_id=2&amount=10&trans_date=2005-11-14
 20:52:10&trans_log=113200873013026&tp_Kodes=1
[11/14/05 22:52:10:268 GMT] 686b4b72 SystemOut O RESP: 
&ia_error=0&vm=60&in_auction=0&pc_count=6&
[11/14/05 22:52:10:293 GMT] 686b4b72 SystemOut O ZIPCODE:1212
[11/14/05 22:52:10:309 GMT] 686b4b72 SystemOut O WS:RedeemCode Params: 
pincode='4DPJQFVCXLRNIA' redeem_date='2005-11-14 10:52:09' person_id='14560115' 
brand='KO-BR' &js_error=0&vm=60&pc_count=6
[11/14/05 22:52:10:377 GMT] 5636cb62 SystemOut O Algoritmo: H
[11/14/05 22:52:10:378 GMT] 5636cb62 SystemOut O Semilla del nuevo 
algoritmo:-1


And my match is in last line (the :-1), but I need that line and the two lines 
above. my question is how do I get that two lines above ???

Regards and Thanks a lot !!!



You could for example do that by buffering them. Following example reads 
from standard input. No that you should replace the regexp by something 
with more meaning in your context. This application also assumes that 
there will be at least three lines of input.


my $a=;
chomp $a;
my $b=;
chomp $b;
my $c=;
chomp $c;
while($c !~ /-1$/){
$a=$b;
$b=$c;
$c=;
chomp $c;
}
if($c =~ /-1$/){
print "$a\n$b\n$c\n";
}else{
print "Not found\n";
}

hth
E.
--
Elie De Brauwer


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: cookies

2005-11-16 Thread JupiterHost.Net

Hello,


# animal is an existing cookie with value as 'lion'

my $animal = cookie('animal'); 


# now $animal gets 'lion'

 

# now assign 'tiger' to animal 

my $cookiereplace = "Set-Cookie: animal = tiger;\n"; 


print $cookiereplace

# assignment done

 

my $animal_new = cookie('animal'); 
 


.

# Question : Now what does $animal_new contain?


lion, because:

 1) you just gave the browser new stuff  but [did|could] not do 
anything to fetch the new data.


 2 you have not even done that yet since the header isn't fully sent...



.

 


print header;

 

my $animal_very_new = cookie('animal'); 

 


.

# Question : Also, what does $animal_very_new contain?


Same as above.

Search google for how cookies and HTTp headers work, its all independent 
of what langauge you use to set_ and get_ the data...


Its how and when you fetch and send headers and what the webserver has 
forom your browser at what point.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




about regex

2005-11-16 Thread Rafael Morales
Hi list !!!

This is my trouble, I have a file with this output:

[11/14/05 22:52:10:130 GMT] 686b4b72 SystemOut O POST: 
https://198.104.159.77/ssldocs/ws/xt_vm_transkods.alia?brand=KO-BR&person_id=14560115&password=teatro&trans_id=2&amount=10&trans_date=2005-11-14
 20:52:10&trans_log=113200873013026&tp_Kodes=1
[11/14/05 22:52:10:268 GMT] 686b4b72 SystemOut O RESP: 
&ia_error=0&vm=60&in_auction=0&pc_count=6&
[11/14/05 22:52:10:293 GMT] 686b4b72 SystemOut O ZIPCODE:1212
[11/14/05 22:52:10:309 GMT] 686b4b72 SystemOut O WS:RedeemCode Params: 
pincode='4DPJQFVCXLRNIA' redeem_date='2005-11-14 10:52:09' person_id='14560115' 
brand='KO-BR' &js_error=0&vm=60&pc_count=6
[11/14/05 22:52:10:377 GMT] 5636cb62 SystemOut O Algoritmo: H
[11/14/05 22:52:10:378 GMT] 5636cb62 SystemOut O Semilla del nuevo 
algoritmo:-1


And my match is in last line (the :-1), but I need that line and the two lines 
above. my question is how do I get that two lines above ???

Regards and Thanks a lot !!!

-- 
___
Get your free email from http://mymail.bsdmail.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Hi All

2005-11-16 Thread Paul Johnson
On Wed, Nov 16, 2005 at 08:28:39AM -0600, Gomez, Juan wrote:

> But  why no one has done something to make Perldoc more helpful for all?

Who are you expecting to do that?  Perl is developed by volunteers.  And
the number of active developers is vanishingly small compared to the
number of people who use Perl every day.

Volunteers generally work on what they find interesting or stimulating
or challenging.  This is not always the case of course, people have
their own motives.  Maybe you are sufficiently motivated to work on
improving perldoc?  It would appear that most people aren't.

Since Perl is open source, you have the usual options if you want
something done:

 1.  Do it yourself.
 2.  Get someone else to do it.
 3.  Wait.

Often the best way to get someone else to do something for you is to pay
them.  Yes, this is all a little simplistic, but the principles hold.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Hi All

2005-11-16 Thread Bob Showalter

Shawn Corey wrote:
...searching perldoc really, really sucks. The only search 
available is `perldoc -q keyword` and it only searches the FAQs and 
then, only their questions. That's right, only the questions; the 
answers are skipped!


Here's a 3-line shell script I use to grep through the core documentation.

   #!/bin/sh
   poddir=$(dirname $(perldoc -l perl))
   grep -r "$@" $poddir/*.pod

Example (on FreeBSD 5.4):

   $ podgrep -iwl gethostbyname
   /usr/local/lib/perl5/5.8.7/pod/perlfaq9.pod
   /usr/local/lib/perl5/5.8.7/pod/perlfunc.pod
   /usr/local/lib/perl5/5.8.7/pod/perlipc.pod
   /usr/local/lib/perl5/5.8.7/pod/perlos390.pod
   /usr/local/lib/perl5/5.8.7/pod/perlport.pod
   /usr/local/lib/perl5/5.8.7/pod/perltoc.pod
   /usr/local/lib/perl5/5.8.7/pod/perltoot.pod
   /usr/local/lib/perl5/5.8.7/pod/perlvms.pod

But I agree that a Google search like "gethostbyname 
site:perldoc.perl.org" is superior.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: referencing functions

2005-11-16 Thread Tom Allison

>Well, you can define the subs anywhere and use references:
>
>sub f {
>my $value = shift;
>print "$value\n";
>}
>
>sub g {
>my $value = shift;
>print "\t$value\n";
>}
>
>my %subs = (
>f => \&f,
>g => \&g,
>);

Now THAT looks good.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Hi All

2005-11-16 Thread Gomez, Juan
But  why no one has done something to make Perldoc more helpful for all?

 


Armando Gomez Guajardo 
Process Engineer
Work Ph   956 547 6438 
Beeper956 768 4070

-Original Message-
From: Dennis G. Wicks [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 8:05 AM
To: beginners@perl.org
Subject: Re: Hi All


On Wed, 16 Nov 2005, Shawn Corey wrote:

> Date: Wed, 16 Nov 2005 08:34:16 -0500
> From: Shawn Corey <[EMAIL PROTECTED]>
> To: beginners@perl.org
> Subject: Re: Hi All
>
> Randal L. Schwartz wrote:
> >>"Hridyesh" == Hridyesh Pant <[EMAIL PROTECTED]>
writes:
> >
> >
> > Hridyesh> Check this site http://perldoc.perl.org/
> >
> > Why refer someone to a website that replicates everything that is on

> > their own disk anyway?  It boggles my mind every time I see this!
> >
>
> Because searching perldoc really, really sucks. The only search 
> available is `perldoc -q keyword` and it only searches the FAQs and 
> then, only their questions. That's right, only the questions; the 
> answers are skipped!
>
> If you want to make perldoc useful, why don't you organize a project 
> to go thru its PODs and add X<...> where appropriate?
>

I agree. Perldoc is of little use to the beginning student of perl. It
needs a function similar to  man -k  then it would be really useful.

--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED] 



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Hi All

2005-11-16 Thread Dennis G. Wicks

On Wed, 16 Nov 2005, Shawn Corey wrote:

> Date: Wed, 16 Nov 2005 08:34:16 -0500
> From: Shawn Corey <[EMAIL PROTECTED]>
> To: beginners@perl.org
> Subject: Re: Hi All
>
> Randal L. Schwartz wrote:
> >>"Hridyesh" == Hridyesh Pant <[EMAIL PROTECTED]> writes:
> >
> >
> > Hridyesh> Check this site http://perldoc.perl.org/
> >
> > Why refer someone to a website that replicates everything that is on
> > their own disk anyway?  It boggles my mind every time I see this!
> >
>
> Because searching perldoc really, really sucks. The only search
> available is `perldoc -q keyword` and it only searches the FAQs and
> then, only their questions. That's right, only the questions; the
> answers are skipped!
>
> If you want to make perldoc useful, why don't you organize a project to
> go thru its PODs and add X<...> where appropriate?
>

I agree. Perldoc is of little use to the beginning student
of perl. It needs a function similar to  man -k  then it
would be really useful.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Hi All

2005-11-16 Thread Shawn Corey

Randal L. Schwartz wrote:

"Hridyesh" == Hridyesh Pant <[EMAIL PROTECTED]> writes:



Hridyesh> Check this site http://perldoc.perl.org/

Why refer someone to a website that replicates everything that is on
their own disk anyway?  It boggles my mind every time I see this!



Because searching perldoc really, really sucks. The only search 
available is `perldoc -q keyword` and it only searches the FAQs and 
then, only their questions. That's right, only the questions; the 
answers are skipped!


If you want to make perldoc useful, why don't you organize a project to 
go thru its PODs and add X<...> where appropriate?



--

Just my 0.0002 million dollars worth,
   --- Shawn

"Probability is now one. Any problems that are left are your own."
   SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: regex

2005-11-16 Thread John W. Krahn
Gerard Robin wrote:
> Hello,

Hello,

> in a script I can write:
> 
> if (
> 
> $subject =~ /phar/i or
> $subject =~ /phfar/i or
> $subject =~ /phhar/i or
> $subject =~ /phya/i or
> $subject =~ /photo/i
> 
> 
> ){..}
> 
> "or"
> 
> if (
> 
> $subject =~ /ph(ar|far|har|ya|oto)/i
> 
> ){...}
> 
> "or" 
> 
> if (
> 
> $subject =~ qr(ph(ar|far|har|ya|oto))i
> 
> ){...}
> 
> I wonder which one of these forms is faster ?

The first one should be faster.  Of course you could use the Benchmark module
to find out for sure.


> About qr : 
> 
> if  I do :
> 
> $match = qr(ph(ar|far|har|ya|oto));
> 
> print ref $match, $/;
> 
> I get the output:
> 
> Regexp
> 
> What is $match exactly ? 

It is a compiled regular expression.



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: help explaining for this script

2005-11-16 Thread Jeff 'japhy' Pinyan

On Nov 16, Paul Johnson said:


On Tue, Nov 15, 2005 at 06:48:40PM -0500, Jeff 'japhy' Pinyan wrote:


whereas if $_[1] is tainted, then the eval { ... } returns false since a
fatal error is raised because

  eval 1 . substr($_[0], 0, 0)

is illegal if $_[0] is tainted.


I would be wary of even this solution.  The backwards compatibility
police would probably catch it, but someone might say that a zero length
string could never be tainted and then this code would break.


I would be very annoyed at the person who made that decision.


I would go with Scalar::Util::tainted().


Certainly.  And hooray, as of 5.8, Scalar::Util is a core module.  Huzzah.

--
Jeff "japhy" Pinyan%  How can we ever be the sold short or
RPI Acacia Brother #734%  the cheated, we who for every service
http://www.perlmonks.org/  %  have long ago been overpaid?
http://princeton.pm.org/   %-- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Check empty hash

2005-11-16 Thread John W. Krahn
Suvajit Sengupta wrote:
> Hi,

Hello,

> How can I test whether a hash is empty or not ?
> For e.g: I have reference to a hash , say $preCommand and I get
>  $preCommands  as {} ,
>  Its an empty hash, but it exists and is also defined.
> I need to check whether the hash is empty or not.
> Does anyone has any clue ?

unless ( %$preCommands ) {
print "The hash %\$preCommands is empty.\n";
}


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: help explaining for this script

2005-11-16 Thread Paul Johnson
On Tue, Nov 15, 2005 at 06:48:40PM -0500, Jeff 'japhy' Pinyan wrote:

[ ... ]

> *whew*
> 
> Frankly, I find the 'eval "1 || $blank" || 1' silly, since the whole 
> reason the '... || 1' is needed is since $blank is a blank string and the 
> code '1 || ' is invalid Perl.  Long story short, I'd have written:
> 
>   sub is_tainted {
> return not eval { eval 1 . substr($_[0], 0, 0) };
>   }
> 
> It's much more concise.  If $_[0] isn't tainted, then
> 
>   not eval { eval 1 . substr($_[0], 0, 0) }
>   ->
>   not eval { eval 1 }
>   ->
>   not eval { 1 }
>   ->
>   not 1
>   ->
>   false
> 
> whereas if $_[1] is tainted, then the eval { ... } returns false since a 
> fatal error is raised because
> 
>   eval 1 . substr($_[0], 0, 0)
> 
> is illegal if $_[0] is tainted.

I would be wary of even this solution.  The backwards compatibility
police would probably catch it, but someone might say that a zero length
string could never be tainted and then this code would break.

I would go with Scalar::Util::tainted().

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Check empty hash

2005-11-16 Thread Suvajit Sengupta

Thanx, Beau ..it worked !!
Regards,
Suvajit

Beau E. Cox wrote:


Hi Suvajit Sengupta -
 
At 2005-11-16, 01:32:31 you wrote:
 


Hi,
How can I test whether a hash is empty or not ?
For e.g: I have reference to a hash , say $preCommand and I get
$preCommands  as {} ,
Its an empty hash, but it exists and is also defined.
I need to check whether the hash is empty or not.
Does anyone has any clue ?

Regards,
Suvajit
   



Try:

unless( keys %$preCommands ) {
...hash is empty...
}

You can use 'keys %hash' ( or if necessary 'scalar keys %hash' ) to
get a count of the number of hash elements just like @array for arrays.

Aloha => Beau;
[EMAIL PROTECTED]
2005-11-16



 



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: cookies

2005-11-16 Thread S, karthik \(IE03x\)
 

I know that there are many template systems and modules available to implement 
it. I have experienced using sessions. That was easy too. But cookies behave 
differently. I need to understand the behavioral issues in cookies.

 

 

Now, let me put my doubt in other terms. 

 

Please, look into the following code:

 

 

# animal is an existing cookie with value as 'lion'

my $animal = cookie('animal'); 

# now $animal gets 'lion'

 

# now assign 'tiger' to animal 

my $cookiereplace = "Set-Cookie: animal = tiger;\n"; 

print $cookiereplace

# assignment done

 

my $animal_new = cookie('animal'); 

 

.

# Question : Now what does $animal_new contain?

.

 

print header;

 

my $animal_very_new = cookie('animal'); 

 

.

# Question : Also, what does $animal_very_new contain?

.

 

 

 

 

-Original Message-
From: Chris Devers [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 14, 2005 8:36 PM
To: S, karthik (IE03x)
Cc: Perl Beginners List
Subject: RE: cookies

 

On Mon, 14 Nov 2005, S, karthik (IE03x) wrote:

 

> my $username = 'name';

> my $cookiereplace = "Set-Cookie: username=$username; expires= \n";

> print $cookiereplace

> 

> print header;

> 

> #print htmls

> 

> 

> To unset the cookie :

> 

> my $cookiereplace = "Set-Cookie: username='';";

 

Okay, that's a start, thank you.

 

Now, please, can you point out the documentation you were reading that 

led you to believe that this would do anything useful?

 

I have a hunch you may have mis-read something :-)

 

Here's a hint: among a great many other ways to do this, the CGI.pm 

module has built-in methods to handle this for you. Look up for the 

cookie sections of the CGI perldoc; an online version is here:

 

http://perldoc.perl.org/CGI.html#HTTP-COOKIES

 

Additionally, higher-level modules like CGI::Application do a lot of the 

work needed to make you forget that cookies are even necessary. 

Documentation on it is available at

 

http://search.cpan.org/~markstos/CGI-Application/lib/CGI/Application.pm

 

But if you just want to do things the old-fashioned way with raw 

cookies, don't roll your own code to do this when it's a problem that 

has been solved a hundred thousand times now -- just let CGI.pm do it.

 

 

-- 

Chris Devers

 

^0%T [EMAIL PROTECTED]



Re: Check empty hash

2005-11-16 Thread Beau E. Cox
Hi Suvajit Sengupta -
  
At 2005-11-16, 01:32:31 you wrote:
>Hi,
> How can I test whether a hash is empty or not ?
>For e.g: I have reference to a hash , say $preCommand and I get
>  $preCommands  as {} ,
>  Its an empty hash, but it exists and is also defined.
>I need to check whether the hash is empty or not.
>Does anyone has any clue ?
>
>Regards,
>Suvajit

Try:

unless( keys %$preCommands ) {
...hash is empty...
}

You can use 'keys %hash' ( or if necessary 'scalar keys %hash' ) to
get a count of the number of hash elements just like @array for arrays.

Aloha => Beau;
[EMAIL PROTECTED]
2005-11-16



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Check empty hash

2005-11-16 Thread Suvajit Sengupta

Hi,
I have used Data::Dumper to get the hash. I can test myself that the 
hash is empty.

But how can test in by script that the hash is empty?

Regards,
Suvajit

[EMAIL PROTECTED] wrote:


HI,

You can use Data::Dumper And print the hash reference as,

use Data::Dumper
print Dumper ($preCommands);

If the output is VAR1= {};

Then there are no entries in the has tables

HTH

Regards,
Shaman




-Original Message-
From: Suvajit Sengupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 16, 2005 4:33 PM
To: Perl Beginners List
Subject: Check empty hash

Hi,
How can I test whether a hash is empty or not ?
For e.g: I have reference to a hash , say $preCommand and I get
 $preCommands  as {} ,
 Its an empty hash, but it exists and is also defined.
I need to check whether the hash is empty or not.
Does anyone has any clue ?

Regards,
Suvajit

--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED] 






Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


 



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Check empty hash

2005-11-16 Thread Suvajit Sengupta

Hi,
How can I test whether a hash is empty or not ?
For e.g: I have reference to a hash , say $preCommand and I get
 $preCommands  as {} ,
 Its an empty hash, but it exists and is also defined.
I need to check whether the hash is empty or not.
Does anyone has any clue ?

Regards,
Suvajit

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




regex

2005-11-16 Thread Gerard Robin
Hello,
in a script I can write:

if (

$subject =~ /phar/i or
$subject =~ /phfar/i or
$subject =~ /phhar/i or
$subject =~ /phya/i or
$subject =~ /photo/i


){..}

"or"

if (

$subject =~ /ph(ar|far|har|ya|oto)/i

){...}

"or" 

if (

$subject =~ qr(ph(ar|far|har|ya|oto))i

){...}

I wonder which one of these forms is faster ?


About qr : 

if  I do :

$match = qr(ph(ar|far|har|ya|oto));

print ref $match, $/;

I get the output:

Regexp

What is $match exactly ? 

Why I can bless $match ?

tia (I know perldoc perlop ...) 


-- 
Gérard


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Hi All

2005-11-16 Thread Pant, Hridyesh
For merlyn:
I don't know about your mind functionality and even don't want to
know.but I am sorry if it boggles ur mind.
For perl User:
Any way I just sent the link which might be useful to somebody.

Thanks
Hridyesh

-Original Message-
From: merlyn@stonehenge.com [mailto:[EMAIL PROTECTED] 
Sent: 16 November 2005 15:06
To: beginners@perl.org
Subject: Re: Hi All


> "Hridyesh" == Hridyesh Pant <[EMAIL PROTECTED]> writes:

Hridyesh> Check this site http://perldoc.perl.org/

Why refer someone to a website that replicates everything that is on
their own disk anyway?  It boggles my mind every time I see this!

Learn to use the "perldoc" command.

As for sites, check the resources of http://learn.perl.org/

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
0095
 http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Hi All

2005-11-16 Thread Randal L. Schwartz
> "Hridyesh" == Hridyesh Pant <[EMAIL PROTECTED]> writes:

Hridyesh> Check this site http://perldoc.perl.org/

Why refer someone to a website that replicates everything that is on
their own disk anyway?  It boggles my mind every time I see this!

Learn to use the "perldoc" command.

As for sites, check the resources of http://learn.perl.org/

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Hi All

2005-11-16 Thread Pant, Hridyesh
Check this site http://perldoc.perl.org/

Regards
Hridyesh

-Original Message-
From: Santosh Reddy [mailto:[EMAIL PROTECTED] 
Sent: 15 November 2005 12:10
To: beginners@perl.org
Subject: Hi All


Hi All,

 

This is my first mail to this mailing list. I am just starting to learn
Perl.

Please help me in getting the basics cleared.

 

Thanks

Santosh

 

 

 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]