Re: Help...

2006-04-20 Thread Sano Babu
On 4/21/06, hridyesh pant [EMAIL PROTECTED] wrote:

 Hi dhanashri,
 I will take care in future..

 Thanks
 Hridyesh

 Dhanashri Bhate wrote:


[junk snipped]

I myself am not a perl expert, and but I have taken help from the list
 quite
 often and it really helps if your subject and mail describes exactly what
 you are trying to do, what approach you have taken to tackle it, and what
 problems you are facing in your solution.
 
 So, my reply was just a suggestion from someone who is also in the
 learning
 stage in Perl programming and nothing more!
 
 How you take it depends on you!
 


 Well Bhate, it seems that your not-so-welcomed sort of behaviour isn't so
much welcomed after all. I know how user should behave in this list but
saying that, let me also mention that if you are of no help, you are of no
use. Go read Larry's text (Perl programming), Randal's text. If you don't
know what you are talking about, please don't even bother.

If you have time to be rude, then you do have time to be polite as well.

Tell them to do their homework politely.

In the case of OP's question, one way of doing it would be using sockets. I
do not have time nor energy at this point to say how they communicate. Have
a look at IPC concept. Especially each of your code will open a socket
(address + port) and send/listen for data. Then process that data
accordinly. You could use LWP threads too if you have huge amount of data to
be processed.

Hope that helps.



 Dhanashri
 
 
 
 -Original Message-
 From: hridyesh pant [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 21, 2006 10:03 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Help...
 
 what do you mean by meaningful subject,do u read only subject part in
 your mailand then try to understand what is written in the
 mail
 
 Dhanashri Bhate wrote:
 
 
 
 Hi Hridayesh,
 
 First of all, give a meaningful subject!
 We can pass a value from one perl program to another, the simplest
 case
 being, a.pl returns a value which is accepted by b.pl as a command
 line
 argument! But, you need to describe exactly what u want to do! And
 what
 
 
 you
 
 
 have tried till now. Then only one can help!
 
 Dhanashri
 
 
 
 
 
 -Original Message-
 From: hridyesh pant [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 20, 2006 4:49 PM
 To: beginners@perl.org
 Subject: Help...
 
 Hi,
 Is there a way to pass a Value from one perl Program(a.pl) to
 another
 Perl program(b.pl).
 
 Regards
 hridyesh
 
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 http://learn.perl.org/ http://learn.perl.org/first-response
 
 
 
 
 
 
 
 
 
 
 
 

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 http://learn.perl.org/ http://learn.perl.org/first-response





--
Cheers,
SanoBabu


Re: Removing many files and subdirectories under a folrder

2004-10-04 Thread Sano Babu
On Mon, 4 Oct 2004 00:26:22 -0700 (PDT), Denzil Kruse
[EMAIL PROTECTED] wrote:
 Not a perl master, but can't you just do a:
 
 system(rm -r dirname);

What if its windows system? blahhh... :-000ps..!!
Moreover if it was some other **ix type system, I don't think the
above code will smell right when cooked. Thats what i guess though.
:-)

 Is that what you mean?
 
 Denzil
 
 
 
 --- John [EMAIL PROTECTED] wrote:
 
  can the above be done with one perl function?
 
  
Yes it can be done using Perl. Read some doc... There are in-built
functions called rmdir, mkdir and many more.. Good way to start is
'perldoc perlfunc' for it.

[snip]


-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Removing many files and subdirectories under a folrder

2004-10-04 Thread Sano Babu
On 04 Oct 2004 05:15:04 -0700, Randal L. Schwartz [EMAIL PROTECTED] wrote:
  John == John  [EMAIL PROTECTED] writes:
 
 John can the above be done with one perl function?
 
 use File::Path qw(rmtree);
 rmtree('/some/path/to/the/top');
 
If the directory has read-only permission shouldn't the program report
read-only directory. Can't delete ! or something without having to
explicitly die??  Are the semantics heading the right way here?? It
seems rmtree is doing 'chmod +wx' or something here before deleteing
the dir/file, is it right or is it implementation dependent via the
programmer?

 --
 Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 [EMAIL PROTECTED] URL: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!

[snip]

-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: modules

2004-10-01 Thread Sano Babu
[snip]
 If you want to do as the Romans do, maybe you can sign up for a Gmail
 account or something that would be more flexible...
Do u want to be one of the Romans? :-) Its hell good being Roman.. 
Amongst many other things just to name a few advantage of being Roman are
u almost never might need to delete messages and the contacts are
pretty easy to get around, short cut key etc.. 1000 mb to use as ur
own sec storage space. Its pretty good. I feel great! That pretty much
explains why Romans ruled this world once. :)
[snip]
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 http://learn.perl.org/ http://learn.perl.org/first-response
 
 



-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-10-01 Thread Sano Babu
 Perl is more powerful.  Python is simpler.  Python is for people
 who don't want to master a language -- just use it casually.
 
 
 This is no serious statement. Python is simple and power too. Read
 please Bruce Eckel why he left Perl and came to Python.
 At least, it's really object-oriented as against Perl and it has more
 funny syntax :).
 

Perl has OO support. In my opinion those funny syntax get u the job
done quicker when your boss comes down to you with deadly deadlines.
~;-) I assume those syntax u are talking about is regular expression.

 
 --
 Best regards,
 Nicolay
 
 http://www.soft411.com - Excellent soft archive
 http://www.spamliquidator.com - Kill spam

[snip]

-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




how do i describe a perl user?

2004-09-30 Thread Sano Babu
just wondering what a user of Perl may be called? Perler?? Theres
got to be some fancy name for it. Perl is not just another programming
language.. I reckon its much more like a religion with attitude.. :)

Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: how do i describe a perl user?

2004-09-30 Thread Sano Babu
On Thu, 30 Sep 2004 11:35:24 -0500, Errin Larsen [EMAIL PROTECTED] wrote:
 
 
 On Fri, 1 Oct 2004 01:37:44 +0930, Sano Babu [EMAIL PROTECTED] wrote:
  just wondering what a user of Perl may be called? Perler?? Theres
  got to be some fancy name for it. Perl is not just another programming
  language.. I reckon its much more like a religion with attitude.. :)
 
  Cheers,
  SanoBabu
 
 
 I say 'Perler' when I'm addressing this list.  Haven't had anyone
 complain yet!  I haven't seen anything else!  Anyone else have some
 suggestions?  The 'Guru's on the web are at a site called Perl
 Monks.  But what do you call a devotee, not a guru?

Well thats what http://www.google.com/search?q=define%3A%20guru says..
i say to be a guru someone has to be nutcrack... :) It takes a lot of
patience, hardship to be one.. lets say like Randal, Larry or Tom who
help peps with that same answer over n over again..
I read somewhere Perl monks are like maniacs or something.. :) but in
a good way.. All Perl hacker are maniacs i guess with coffeine
ejecting out of their nerves..
As i say this i am still learning Perl and intend to be like them one
day...(lets see when that day is now [ nodding to myself ] )

 --Errin
 


-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-30 Thread Sano Babu
 Can you reveal anymore about this, as I read it on stonehenge too.

  Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
  [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
  Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.

 Does Randal write Comedy  stuff as well? It would be a best seller
 amongst Perl Programmers I gues.. :)
 
  See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
  training!
 



-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: difference between @_ and shift

2004-09-30 Thread Sano Babu
On Thu, 30 Sep 2004 20:19:11 +0100, Graeme McLaren
[EMAIL PROTECTED] wrote:
 Hi all, I'm having a look in to object oriented perl.  Can anyone tell me
 what the difference between @_ and shift is?  As far as I know there is no

Straight from the Llama :
@array = qw /dino fred barney/;
$a = $shift @array; # $a gets dino, @array reduced to (fred , barney);

 difference except shift removes the parameter from the @_ array so if you
 were to shift all parameters passed to a function nothing would be
 containted in @_   is this correct?

@_ variable is local to the subroutine. It stores argument to a
subroutine. If u keep on doing shift inside a subroutine then @_
will be empty  will become uninitialized again.
  sub test {
  #$a = shift ;
  my $a = shift @_ ;
  print $a;
  my $b = shift @_;
  print $b;
  }
test(1);
-perl -w test.pl
-Use of uninitialized value in print at test.pl line 9.
1

But this doesn't in anyway affect the @_ variable outside the
subroutine if there happens to be any.

 I'm asking because I'm a little confused about using it.  Why can't I do
 this:

 ###
 sub nickname {
my $self = shift;
return $self-{NICK};
 }
 ###

[snip]

$self looks alot like this in Java.. no? :)

-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: difference between @_ and shift

2004-09-30 Thread Sano Babu
  So. In the context of subroutine arguments, you're generally passing in
  one or more arguments. If you're only passing one, then you're right --

  my $arg = @_;
So what wiggins saying, here $arg has now 1 ? 

  my $arg = shift;
here $arg has now the value of the first element(argument) ? 

  my $arg = $_;
here $arg gets default value?

   -- are all equivalent.

I agree. :)

[snip]
-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: difference between @_ and shift

2004-09-30 Thread Sano Babu
 Ha, didn't even notice that one, yep $_ is definitely different than
 $_[0], which is what the others would have.
 
 
 -- are all equivalent.
 
  I agree. :)
 
 
 ?? You are agreeing that they are, or aren't?  They definitely aren't.

hahah..That was a bad post..I mean I agree with what u said. :-) 

 
[snip]

-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Check for valid email address

2004-09-30 Thread Sano Babu
On Thu, 30 Sep 2004 23:58:34 +0200, Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote:
 Denzil Kruse wrote:
  Gunnar Hjalmarsson wrote:
  What you can do is testing if the domain/host has an MX record.
  And you can of course test the syntax, but that's it.
 
  Okay, that sounds like Mail::Verify then.
 
 I had a look at the source of Mail::Verify, and even if the module
 claims to verify the syntax, it doesn't really. You may want to check
 out e.g. Email::Valid, too.

Gunnar let me ask u a question.. :) DO u ever sleep?? U're constantly
helping people out here... It seems u never step back from helping :)
anyway thats good. and personally i've not had a chance to ask u
questions in Perl in this list as i am still pretty much a learner,
let me take a break n say thanks :-) (OK thats not much or is it?)..
Its really nice to have people around for support while learning. :-)

[snip]
 
 
 --
 Gunnar Hjalmarsson
 Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
[snip]

-- 
Cheers,
SanoBabu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response