Re: Perl Code

2012-09-01 Thread Dr.Ruud
On 2012-08-29 18:46, Ashwin Rao T wrote: 3)Check if email address is valid using only return functions and regular expressions in Perl. It has been tried: http://www.regular-expressions.info/email.html http://ex-parrot.com/~pdw/Mail-RFC822-Address.html http://stackoverflow.com/questions/201

Re: matching array elements from hash ?

2012-09-01 Thread Dr.Ruud
On 2012-08-20 00:18, John W. Krahn wrote: print map exists $stud{ $_ } ? "$_ = $stud{ $_ }\n" : (), @names; A map using a ternary with (), is like a grep: print "$_ = $stud{ $_ }\n" for grep exists $stud{ $_ }, @names; -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: How to do ssh connection from client-to-remote machine1-to-remotemachine2-to-remote machine3 and execute command on remote machine3

2012-09-01 Thread Dr.Ruud
On 2012-08-24 13:28, Sasikanth Eda wrote: 1. Script has to run on client machine. 2. Using the Perl script on client machine, we need to login to remote machine-1 using ssh protocol. 3. From remote machine-1, the script should login to other remote machine-2 using ssh protocol. 4. From remote

Re: Catfile function not working on windows 7 machine

2012-09-01 Thread Dr.Ruud
On 2012-08-08 12:17, Sandip Karale wrote: use File::Spec::Functions; my $f="foo.txt"; my $d="machdir"; Try: my $d = '//mach/dir'; print "$f \n"; print "$d \n"; print catfile($d,$f); -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands