Re: not able to send a cookie to my ajax call:

2016-06-14 Thread Rajeev Prasad via beginners
a From: of the list and a reply-to to your personal Yahoo account. That may be a Yahoo mishap so please consider avoiding using Yahoo when posting to mailing lists. On Sun, 12 Jun 2016 21:23:49 + (UTC) Rajeev Prasad via beginners wrote: > hello perl Gurus, > > I have put the sam

not able to send a cookie to my ajax call:

2016-06-12 Thread Rajeev Prasad via beginners
hello perl Gurus, I have put the same question on stack exchange, but getting no response... I am NOT able to send the cookie in response to AJAX call to my webpage. I am following it exactly as the manual says, putting the cookie in the header of "$q", but it is not working :(the javascript code

Re: ? getting appended to file name while writing o file

2015-03-19 Thread Satya Prasad Nemana
;> No - that one's a mystery to me:) I suspect it's something to do with the >> terminal and character encoding >> >> >> http://stackoverflow.com/questions/5306153/how-to-get-terminals-character-encoding >> >> Andrew >> >> >> On Thu, M

Re: ? getting appended to file name while writing o file

2015-03-19 Thread Satya Prasad Nemana
; chomp($logFileName) > > otherwise there's a trailing newline character in $logFileName on account > of the call to date > > Andrew > > On Thu, Mar 19, 2015 at 6:08 AM, Satya Prasad Nemana > wrote: > >> Hi >> >> I have a small program listed below where i

? getting appended to file name while writing o file

2015-03-18 Thread Satya Prasad Nemana
int $logFile "\nPing to host $host ip $ip is successful"; } else { print "\nPing to host $host ip $ip is failure"; print $logFile "\nPing to host $host ip $ip is failure"; } } close $logFile; -- Satya Prasad

series of numbers to range notation

2014-01-07 Thread Rajeev Prasad
so i have this series of numbers: 349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,

remotely operate web page/website

2013-11-25 Thread Rajeev Prasad
i need to go to a website and input some data in a specific input field, and run the query which opens a new page, i need to download and save it as an html page on my unix box. there are several blockages i am not able to figure out. 1. authentication is happening via another website, auth atte

Re: formatting a list

2013-09-30 Thread Rajeev Prasad
thank you Shawn. this works nicely for me. From: Shawn H Corey To: beginners@perl.org Cc: Rajeev Prasad Sent: Saturday, September 28, 2013 8:49 AM Subject: Re: formatting a list On Fri, 27 Sep 2013 22:59:01 -0700 (PDT) Rajeev Prasad wrote: > i w

formatting a list

2013-09-27 Thread Rajeev Prasad
hello, following is obtained by concatenating 3 values using an underscore to produce a list: abc_12_4567 xy4z_xtr4_sdf PQRSDR_xcvf_scc234 i want them to look neat, something like this: where they look in line. I do not know before hand how long each word would be abc124567 xy4z___

setting expect buffer size when reading/writing to PIPE

2013-06-28 Thread Rajeev Prasad
how to set length of read buffer when expect object is a PIPE. my ($pty, $pid) = $ssh->open2pty($command); my $exp = Expect->init($pty); _now how can i set the buffer size on this object? when i print following from script, both of the following values are 0 $exp->match_max() $exp->max_accum()

Re: printing content of a pipe

2013-06-28 Thread Rajeev Prasad
i see, it changes 'destination' for the rest of the perl script, you mean. i have another question which i will submit in new thread. From: Shlomi Fish To: Rajeev Prasad Cc: perl list Sent: Friday, June 28, 2013 11:45 AM Subject: Re: printing

Re: printing content of a pipe

2013-06-28 Thread Rajeev Prasad
28, 2013 4:48 AM Subject: Re: printing content of a pipe Hi Rajeev, see below for some comments on your code. On Thu, 27 Jun 2013 15:07:50 -0700 (PDT) Rajeev Prasad wrote: > in the below code I am not able to print anything except whatever is in the > $pty.  I want to print LINE_START

printing content of a pipe

2013-06-27 Thread Rajeev Prasad
in the below code I am not able to print anything except whatever is in the $pty.  I want to print LINE_START: in the beginning of each line of the output, but it does not print that, it only prints what the output of the exceuted command produced. why is that so?     while(<$pty>) {          

Re: Perl and Web Development

2013-06-10 Thread Rajeev Prasad
in my opinion it is better to use CSS/HTML and javascript to handle frontend work and perl doing all the backend processing, only generating json data for frontend to parse and display. perl is very good and most things have not changed much: like handling time, text/numeric data, text/database

Re: Email::Sender::Simple how to set priority?

2013-04-26 Thread Rajeev Prasad
using outlook and these are working with same sendmail binary from shell script. From: Rob Dixon To: perl list Cc: Rajeev Prasad Sent: Friday, April 26, 2013 9:21 PM Subject: Re: Email::Sender::Simple how to set priority? On 27/04/2013 00:21, Rajeev

Email::Sender::Simple how to set priority?

2013-04-26 Thread Rajeev Prasad
following is still coming out as normal priority email. use strict; use warnings; use Email::MIME; use Email::Sender::Simple qw(sendmail); my @mesg=qw(fox jumps over the); my $subject='IMP mesg'; my $message = Email::MIME->create(   header_str => [     From    => '',     To      => '<'y...@a

Re: [BackupPC-users] BackupPC future development (was: Backuppc and windows)

2013-04-06 Thread Rajeev Prasad
Has anyone shared this thread on perl mailing list yet? since we are looking for a perl devloper, i thought i would put it on the perl list to see if we get any response. thx. Rajeev - Original Message - From: "backu...@kosowsky.org" To: Tyler J. Wagner Cc: "General list for user

Re: Email::Mime not able to send array in mesg body

2013-02-20 Thread Rajeev Prasad
ST) Rajeev Prasad wrote: > hello follwoing code is sending empty email body. I am trying to send > HTML content in body of mesg. It works if I use a string instead of > array So, er, use a string? Why are you trying to pass an array as the body?  What are you expecting to happen?  The argu

Email::Mime not able to send array in mesg body

2013-02-20 Thread Rajeev Prasad
hello follwoing code is sending empty email body. I am trying to send HTML content in body of mesg. It works if I use a string instead of array. I tried sending reference to @email_body, but It simply printed array_ref in body. modules used are: use Email::MIME; use Email::Sender::Simple qw(sen

Re: ok how about this: source code compressor

2013-02-18 Thread Rajeev Prasad
hmm i thought, it would load the whole script in memory and then execute. so a smaller file size will take less RAM... thx. From: Brian Fraser To: Rajeev Prasad Cc: perl list Sent: Friday, February 15, 2013 7:56 PM Subject: Re: ok how about this: source

ok how about this: source code compressor

2013-02-15 Thread Rajeev Prasad
it not only decreases the size, to load in RAM, also make it 'little harder' for cocky-novices to steal the tricks (perl guru's anyway dont care). http://www.stunnix.com/prod/po/  (binary not present to download??) http://blueboxtech.co.uk/perlplexity/  (failed to remove trailing comments...) ht

Re: obfuscating code

2013-02-14 Thread Rajeev Prasad
From: Paul Johnson To: John SJ Anderson Cc: beginners@perl.org Sent: Wednesday, February 13, 2013 5:50 PM Subject: Re: obfuscating code On Tue, Feb 12, 2013 at 03:18:51PM -0800, John SJ Anderson wrote: > > On Feb 12, 2013, at 3:05 PM, Kevin Walzer wrote: > > > Does Perl have the equivale

Re: obfuscating code

2013-02-12 Thread Rajeev Prasad
sorry, idea is dropped. From: Rajeev Prasad To: perl list Sent: Tuesday, February 12, 2013 11:01 AM Subject: obfuscating code freinds, what is the advice just for obfuscating code? platform is solaris. ty.

obfuscating code

2013-02-12 Thread Rajeev Prasad
freinds, what is the advice just for obfuscating code? platform is solaris. ty.

confusion about modules for email

2013-02-08 Thread Rajeev Prasad
Hello, I want to use an email module on my webserver, which is NOT running any mail server. I am not sure if I have install and configure a mail server first??? how does following modules work? they need a mail server running in the back? Mail::Sendmail Email::Sender pl advice from your ex

expect module $expect->log_file(\&captureexpectout $arg2 $arg3);

2013-02-05 Thread Rajeev Prasad
Hello,   I have a working sub like this:   sub captureexpectout { my $data_coming_in_from_expect_call = shift; ...do something with data.. ... ... }   which i am calling like this:   $expect->log_file(\&captureexpectout);     Now I want to call this subroutine with arguments. I tried below but I go

Re: Net::Openssh disable password based login

2013-01-27 Thread Rajeev Prasad
nevermind. i figured it need to give this option: -o => 'PasswordAuthentication=no', From: Rajeev Prasad To: perl list Sent: Sunday, January 27, 2013 1:10 PM Subject: Re: Net::Openssh disable password based login forgot to mention th

Re: Net::Openssh disable password based login

2013-01-27 Thread Rajeev Prasad
forgot to mention that, i have no control over ssh server (to add 'PasswordAuthentication no' option to server config) From: Rajeev Prasad To: perl list Sent: Sunday, January 27, 2013 1:09 PM Subject: Net::Openssh disable password based login

Net::Openssh disable password based login

2013-01-27 Thread Rajeev Prasad
I guess this is openssh question. but, while using this module, and using key based authentication. some hosts which do not have key installed (perhaps user account does not yet exist there), throws password challenge and then the ssh program wait for too long, till the process is killed by hand

need suggestion stat vs Devl::Size for checking size very very frequently

2013-01-25 Thread Rajeev Prasad
i have a lot of data coming/pouring in from this: my ($rout, $pid) = $ssh->pipe_out($cmd); while (my $line = <$rout>) {     print filehandle $line; } I want to stop writing after certain size is written (say 1gb). so i can try this: (it is working). But I am worried I am doing too many stat (an

how to break out of Net::OpenSSH $ssh->pipe_out($cmd); call

2013-01-25 Thread Rajeev Prasad
I am running a command on remote host to grab some data, i want to stop at a certain size. the following seem to be working (file size does not grow beyond 1MB on disk), but the process keeps running till i guess everything coming from that 'pipe' is finished. how can i stop/break/close the pip

Re: Net::Openssh not fetching data

2012-12-17 Thread Rajeev Prasad
thx a lot Slava, it works!   lastly, does the pipe_out does not 'store' data in RAM - and streams straight to disk? like collecting response from 'capture' in an array?   rgds, Rajeev   From: Salvador Fandino To: Rajeev Prasad Cc: perl

Net::Openssh not fetching data

2012-12-17 Thread Rajeev Prasad
  the following is _i think_ timing out. when it is run from within my script     ( @cmdresult, $cmderr ) = $ssh->capture($CMD);     where $CMD is:   egrep "data_to_grep" *.data_file.txt   the output is about 300Mb of data.   further, the command when run on the remote system directly (after loggi

Re: tt hash values not printing....

2012-10-30 Thread Rajeev Prasad
friends, i have resolved this now. I changed the way i was building the hash value: and then it worked fine. $my_hash->{$index} = [$val1, $val2]; - Original Message - From: Rajeev Prasad To: perl list Cc: Sent: Tuesday, October 30, 2012 6:17 PM Subject: tt hash values

tt hash values not printing....

2012-10-30 Thread Rajeev Prasad
Hello, Since I did not get any reply in last few hours. I am now posting this question to the perl list too. I apologize if you mind. thank you. starting with a hash ref my $my_hash = {}; building the hash in a loop...           push(@tmp_arr,$val1);           push(@tmp_arr,$val2);  

Re: simplestic perl module

2012-10-16 Thread Rajeev Prasad
parent 'Exporter'; our @EXPORT_OK = qw(myroutine); file: perlscript.pl #!/usr/bin/perl use strict; use warnings; use Template; use Mymodule qw(myroutine); my ($output)=myroutine($input); - Original Message - From: Shlomi Fish To: Rajeev Prasad Cc: perl list Sent: Tuesda

Parallel::ForkManager and Net::OpenSSH to handle timeout

2012-10-15 Thread Rajeev Prasad
I am using Parallel::ForkManager to run multiple ssh sessions on various remote hosts. It is working fine. Sometimes I have a problem: problem is in Net::OpenSSH module that, for whatever reason, when far end does not respond the module does not close the SSH connection (i.e. timeout is not wor

simplestic perl module

2012-10-09 Thread Rajeev Prasad
I want to execute this routine which is to be supplied two(sometimes three) string variables. and will return two string variables. I want to keep this routine in a separate file. how to do it? something like: ($var1,$var2) = routine I am either looking to keep this routine in a file which

Re: expect.pm not recognising match string

2012-09-30 Thread Rajeev Prasad
ultimately salva's code at loc: http://cpansearch.perl.org/src/SALVA/Net-OpenSSH-0.58_04/sample/expect.pl is working. I will try to experiment more with it. From: Rajeev Prasad To: Salvador Fandino Cc: David Precious ; perl list Sent: Friday, Sept

sudo module; how to use on remote system

2012-09-30 Thread Rajeev Prasad
Hello Joe, How to use your module on a remote system? module is not installed on remote system, but on my local machine. i am usinf net::openssh to connect to remote system. tx. Rajeev

Re: expect.pm not recognising match string

2012-09-28 Thread Rajeev Prasad
sudo_path -k");                 my @output = $ssh->capture({stdin_data => "$PASS"},   $sudo_path,   "-p",'', "$cmd");                 print "  result=@output \n"; From: Salvador

Re: expect.pm not recognising match string

2012-09-06 Thread Rajeev Prasad
no because first i have to sudo to some other ID and then run commands. From: David Precious To: Rajeev Prasad Cc: perl list Sent: Thursday, September 6, 2012 4:57 AM Subject: Re: expect.pm not recognising match string On Wed, 5 Sep 2012 11:27:28

expect.pm not recognising match string

2012-09-05 Thread Rajeev Prasad
inside ssh tunnel (using Net::Openssh), a pty is opened. then an exp object is init to this pty   my $exp=Expect->init($pty); using this object i am trying to run about quite a few commands on remote system. I am using following method. It has two flaws: 1) does not work if $exp->expect(5); li

moving from 32bit to 64bit linux perl support?

2012-08-29 Thread Rajeev Prasad
Hello friends, I have a lot of scripts written in perl on 32 bit ubuntu linux. i am thinking to migrate to newer 64bit linux server, it will come with perl package, but i am not sure whether there will be 64 bit modules available? lets say for example for Net::Telnet will there be a 64bit versi

many people using same file

2012-08-28 Thread Rajeev Prasad
can multiple users run the same script, at same time, which opens couple of files (file handles) for "reading" only? I would assume yes, but I want to know for sure. thx in advance. Rajeev

Re: re-reading from already read file handle

2012-08-20 Thread Rajeev Prasad
Rob, yes you are right. I apologize if that is not liked. I will not do so in future. I will atleast wait a couple of hours, before i go to any other forum. your help is valuable to me. ty. Rajeev From: Rob Dixon To: Rajeev Prasad ; perl list Sent: Monday

Re: re-reading from already read file handle

2012-08-20 Thread Rajeev Prasad
PM Subject: Re: re-reading from already read file handle On Aug 20, 2012, at 1:39 PM, Rajeev Prasad wrote: > thank you. seek did the job. > > by the way can this be made any better? > > just want to find out in how many records string was found: > >            my $count=0

Re: re-reading from already read file handle

2012-08-20 Thread Rajeev Prasad
($line=~m/\"$str\"/) {$count++;}        #in the file $str string would be in quotes             } From: Andy Bach To: Rajeev Prasad Cc: perl list Sent: Monday, August 20, 2012 2:10 PM Subject: Re: re-reading from already read file handle

re-reading from already read file handle

2012-08-20 Thread Rajeev Prasad
I opened a file to read from line by line. open(FH,"<","$myfile") or die "could not open $myfile: $!"; while () { ...do something } later on in program, try to re-read the file (walk thru the file again): while () { ...do something } and realized that it is as if the control within file is a

Re: subroutine in seperate file, question

2012-08-11 Thread Rajeev Prasad
Thank you. I am confused about how to send variables to this ext.pl and get values (scalars) back into main.pl another confusion is from web the cgi will run, i want to check cookies in external subroutine file and redirect to some website based on some condition, or gives some values back to c

Re: subroutine in seperate file, question

2012-08-10 Thread Rajeev Prasad
I mean to ask, wether they will clash with the same loaded modules loaded in calling script? From: "pa...@riseup.net" To: Rajeev Prasad Cc: perl list Sent: Friday, August 10, 2012 9:05 PM Subject: Re: subroutine in seperate file, question Yes, t

subroutine in seperate file, question

2012-08-10 Thread Rajeev Prasad
i want to keep a peice of code which uses CGI and DBIx module in a seperate file, and want to include it in all my scripts as follows:   require "/path/to/script/file";   I am not sure if the calling program is also using same modules CGI and DBIx what kind of unknown errors i might get? anyone k

DBIx schema loader (dump schema using make_schema_at) wierd behaviour

2012-08-07 Thread Rajeev Prasad
Hello,   am I missing anything? when I dump schema of my database using schema loader's make_schema_at. Some .pm file names under Result corrosponding to folders have names chnaged! they do not match to table names!!   e.g. table name costlycookies shows up as Costlycooky.pm !!! another table ch

Re: how to set session variable (not session cookie) using perl CGI

2012-08-07 Thread Rajeev Prasad
Thank you Ron and David. - Original Message - From: Ron Bergin To: Rajeev Prasad Cc: perl list Sent: Tuesday, August 7, 2012 9:36 PM Subject: Re: how to set session variable (not session cookie) using perl CGI -- Rajeev Prasad wrote: > I am using CGI.pm on my website, bu

how to set session variable (not session cookie) using perl CGI

2012-08-07 Thread Rajeev Prasad
I am using CGI.pm on my website, but I generate my pages using TT (template Toolkit).   I have few questions:   0. how to have a session variable (not a session cookie)? If I do not want to use cookie, do i have to store session data in a temp file on server and check it with each page load?    

Re: net::openssh error in CGI: Invalid or bad combination of options ('key_path')

2012-06-28 Thread Rajeev Prasad
authentication? 2. since the module insist on having a .ssh folder in home directory(/var/www), of web user (www-data on linux), how safe is it to have a .ssh folder under /var/www ?? anyone know? ty. Rajeev - Original Message - From: Rajeev Prasad To: Shlomi Fish Cc: perl list Sent: Thursday

Re: net::openssh error in CGI: Invalid or bad combination of options ('key_path')

2012-06-28 Thread Rajeev Prasad
- Original Message - From: Shlomi Fish To: Rajeev Prasad Cc: perl list Sent: Thursday, June 28, 2012 12:46 PM Subject: Re: net::openssh error in CGI: Invalid or bad combination of options ('key_path') Hi Rajeev, On Thu, 28 Jun 2012 10:00:08 -0700 (PDT) Rajeev Pra

net::openssh error in CGI: Invalid or bad combination of options ('key_path')

2012-06-28 Thread Rajeev Prasad
hello can anyone help? following is failing: my $ssh = Net::OpenSSH->new($host,         user => "abc123",         ctl_dir => "/home/openssh_lib_home",         key_path => "/home/openssh_lib_home/.ssh/",         master_opts => [-o => 'StrictHostKeyChecking=no',                         -o => 'Conne

Re: Net::OpenSSH failing in CGI

2012-06-27 Thread Rajeev Prasad
 -o => 'ConnectTimeout 60'],         ); # ls -l /home|grep open drwxrwsr-x  2 www-data www-data 4096 2012-06-27 21:54 openssh_lib_home - Original Message - From: Rajeev Prasad To: perl list Cc: Sent: Wednesday, June 27, 2012 4:13 PM Subject: Net::OpenSSH failing in CGI

Net::OpenSSH failing in CGI

2012-06-27 Thread Rajeev Prasad
my $ssh = Net::OpenSSH->new($host,         user => "abc123",         ctl_dir => "/var/www/mysite.com/www/openssh_lib_home/"         ); ssh is not happening, when i catch the error, i get below: error:  ctl_dir /var/www/mysite.com/www/openssh_lib_home/ is not secure folder is : $ ls -l /var/ww

file rows to colum using Text::CSV ?

2012-06-20 Thread Rajeev Prasad
i wrote this code which turns rows into columns from a csv file (here you see as 'in' array) I am finding it difficult to figure to do this using Text::CSV ??? can anyone suggest how to convert this to use Text::CSV ? thank you. Rajeev #!/usr/bin/perl use warnings; use strict; #array rows t

how to appending to expect output ?

2012-06-19 Thread Rajeev Prasad
hello, i want to append a dynamic string stored in a variable to the beginning of each output row of the expect command, but do not know how to do it. can anyone help pl? module used is  Expect I am using this statement before i run any command on remote host, it captures EVERYTHING. I want

bug in net::openssh? or what am i doing wrong?

2012-06-06 Thread Rajeev Prasad
http://cpan.uwinnipeg.ca/htdocs/Net-OpenSSH/Net/OpenSSH.html#scp_put     following is failing with an error when $folder is not defined. is that correct? i think it should assume $folder as null variable and continue to save in home folder on destination???   $scpresult = $ssh->scp_put($file,$fol

Re: moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?

2012-06-05 Thread Rajeev Prasad
same PERL modules there? On 12-06-05 04:00 PM, Rajeev Prasad wrote: > for e.g. > on 10.10: perl ver is: v5.10 > on 12.04 it is: perl (5.14.2-6ubuntu2) > > is there a quick method to do that? No, but you can adapt this algorithm: http://onionstand.blogspot.ca/2012/05/moving-mod

moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?

2012-06-05 Thread Rajeev Prasad
Hello,   I am going to move (not upgrade) from my current ubuntu ver 10.10  to ver. 12.04 (fresh install). I will restore my data and scripts there and have them ready.   But, how do i have all the required modules (which i have installed on my current PC over months) installed on target system?

has anyone used perl CGI scripts with Hiawatha web server?

2012-03-03 Thread Rajeev Prasad
Anyone has any experience to share about implementing perl CGI scripts on Hiawatha web server? ty. R 

Re: need guidance on encode JSON and sorting

2012-02-05 Thread Rajeev Prasad
d e.g.: 2012-01-20 22:24:36   value is some text - Original Message - From: Rajeev Prasad To: perl list Cc: Sent: Sunday, February 5, 2012 10:20 PM Subject: Re: need guidance on encode JSON and sorting I tried below but getting err:     my $json = JSON::XS->new;     $json

Re: need guidance on encode JSON and sorting

2012-02-05 Thread Rajeev Prasad
I tried below but getting err:     my $json = JSON::XS->new;     $json->get_canonical;     $return_json_text = $json->encode $tmp_hash; Scalar found where operator expected atscript.pl line 80, near "->encode $tmp_hash" ??? - Original Message ----- From: Rajeev

need guidance on encode JSON and sorting

2012-02-05 Thread Rajeev Prasad
in the script this is all i am using JSON as: ... use JSON::XS; ... $return_json_text = encode_json $tmp_hash; this variable ($return_json_text) is then used to display values. I need this to be orderd, but not able to figure how to order the outcome??? I read about $enabled = $json->get_c

DBIx::Class add rows to table, confusion in perldoc example....

2012-02-04 Thread Rajeev Prasad
Author says: Adding and removing rows To create a new record in the database, you can use the create method. It returns an instance of My::Schema::Result::Album that can be used to access the data in the new record: my $new_album = $schema->resultset('Album')->create({ title => 'Wish You Were

Re: Net::Openssh and sudo?

2012-01-28 Thread Rajeev Prasad
: beginners@perl.org Sent: Sunday, January 22, 2012 11:08 AM Subject: Re: Net::Openssh and sudo? On 01/20/2012 08:10 PM, Rajeev Prasad wrote: > > > hello, > > using Net::Openssh how can i use sudo to become some other user (say root) on > a target machine and then execute a ser

Re: Net::Openssh and sudo? SOLVED

2012-01-20 Thread Rajeev Prasad
uot;ls","who am i","id","whoami"); foreach my $cmd (@cmdlist){ $expect->expect(2,     [ qr/runasroot:/ => sub { shift->send("$pass1\n");} ],  #use pass2 if using only su     [ qr/Sorry/   => sub { die "Login failed

Re: Net::Openssh and sudo? made some progress: version 3

2012-01-20 Thread Rajeev Prasad
su     [ qr/Sorry/   => sub { die "Login failed" } ],                 [qr/#/ => sub { shift->send("ls -l\n"); exp_continue;}]                 ) or die "___Timeout!"; __END__ From: Rajeev Prasad To: perl l

Re: Net::Openssh and sudo?

2012-01-20 Thread Rajeev Prasad
asroot:/ => sub { shift->send("$pass1\n");} ],  #use pass2 if using only su     [ qr/Sorry/   => sub { die "Login failed" } ]); $expect->send("\n\n\n"); $expect->expect(2,[ qr/#/ => sub { shift->send("ls -l\n");} ])  #use

Net::Openssh and sudo?

2012-01-20 Thread Rajeev Prasad
hello, using Net::Openssh how can i use sudo to become some other user (say root) on a target machine and then execute a series of commands as root? i looked and tried to use the expect example given on Net::Openssh page but could not make it to work. my $myssh  = Net::OpenSSH->new($host,   

base64 to hex conversion

2012-01-16 Thread Ramprasad Prasad
Hello what is the best way to convert base64 to hex I am currently using use NetSDS::Util::Convert qw ( conv_base64_str conv_str_hex); ... my $hex = conv_str_hex(conv_base64_str($b64)); But the NetSDS::Util module seems not so popular , I dont find it installed on most machines, Getting it i

Re: 32 bitx Hex point code to 24 bit (8-8-8) point code

2012-01-09 Thread Rajeev Prasad
ction by specifying    int($myarr[4])  but i still get same error ?? From: John W. Krahn To: Perl Beginners Sent: Monday, January 9, 2012 4:57 PM Subject: Re: 32 bitx Hex point code to 24 bit (8-8-8) point code Rajeev Prasad wrote: > Hello John, >

Re: supressing error message Use of uninitialized value in concatenation....

2012-01-09 Thread Rajeev Prasad
  10:53 AM, "Rajeev Prasad" scribbled: > Hello, > > I have a lot of fields being concatenated to form a string and sometimes the > values are empty, so i am getting this error: > > Use of uninitialized value in concatenation (.) or string at ./script.pl line > 144,

Re: rows to columns issue

2012-01-09 Thread Rajeev Prasad
  print $aoa[$y][$x]." ";     }     print "\n"; } - Original Message - From: Jim Gibson To: perl list Cc: Sent: Monday, January 9, 2012 3:29 PM Subject: Re: rows to columns issue On 1/9/12 Mon  Jan 9, 2012  1:08 PM, "Rajeev Prasad" scribbled: > &g

rows to columns issue

2012-01-09 Thread Rajeev Prasad
Hello, I tried following code but it is not working. I have a file with many lines(records) where field separator is space. I want to convert rows to columns, something like... source: a b c d 1 2 3 4 output: a 1 b 2 c 3 d 4 Here is my test code: It is not working :( #!/usr/bin/perl u

supressing error message Use of uninitialized value in concatenation....

2012-01-09 Thread Rajeev Prasad
Hello, I have a lot of fields being concatenated to form a string and sometimes the values are empty, so i am getting this error: Use of uninitialized value in concatenation (.) or string at ./script.pl line 144, <$IN_FH> line 1. how can i suppress this? my logic flow: $string1 = "a,b,c,d,e

Re: 32 bitx Hex point code to 24 bit (8-8-8) point code

2012-01-09 Thread Rajeev Prasad
Hex point code to 24 bit (8-8-8) point code Rajeev Prasad wrote: > > Hello, Hello, > I am trying to convert 32 bitx Hex point code to 24 bit (8-8-8) point > code. What does the input look like and what do you expect the corresponding output to look like? > i tried to use below

32 bitx Hex point code to 24 bit (8-8-8) point code

2012-01-08 Thread Rajeev Prasad
Hello, I am trying to convert 32 bitx Hex point code to 24 bit (8-8-8) point code. i tried to use below script from net, but due to limited understanding of perl and above script, I was not able to resolve my problem. Can someone please help me resolve my issue? thank you. Rajeev #!/usr/bin

tinyMCE as web editor for editing code?

2012-01-02 Thread Rajeev Prasad
Hello, Has anyone ever used, tinyMCE as web based editor (to run inside the browser) to edit the perl/php/shell scripts on the server? I am looking for some direction and advice? thank you. Rajeev -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beg

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Rajeev Prasad
and more interest towards php etc... ty. Rajeev From: Shlomi Fish To: Brendan Cc: Rajeev Prasad ; Mark Tiesman ; "beginners@perl.org" Sent: Thursday, December 15, 2011 2:45 PM Subject: Re: Guidance for a New Programmer/Perl User Hi Rajeev, On T

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Rajeev Prasad
Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 From: Mark Tiesman To: beginners@perl.org Sent: Thursday, December 15, 2011 9:54 AM Subject: Guidance for a New Programmer/Perl User Hi all.  I recently started a job

Re: extracting email addresses from a file

2011-11-29 Thread Rajeev Prasad
thx Sheppy, good enough for me. i am a beginner in perl. From: Sheppy R To: Rob Coops Cc: Rajeev Prasad ; perl list Sent: Tuesday, November 29, 2011 9:54 AM Subject: Re: extracting email addresses from a file Couldn't you just use the non-white

extracting email addresses from a file

2011-11-29 Thread Rajeev Prasad
hello,   i am trying to extract email address from a afile, but not quite succesful. here is what i have:   the file: myterqlqt qntmrq Prqtesm qltul qzeez Smqik qltulqzee...@jmqil.com 976665 myterqlqt qntmrq Prqtesm teepqk Mittql teep...@jmqil.com 939383 Onjole qntmrq Prqtesm lmqrqtm Etqrq cont.

How do I implement a cyclic array in perl

2011-11-28 Thread Ramprasad Prasad
I have an array of scalars. I want to run a loop like this my @workers = qw ( a b c ); my $MAXCHILD = 20; foreach my $i( 0 .. $MAXCHILD){ run_job($i,$workers[$i++]); } Can I do this ?

How Do I insert a password into a PDF

2011-11-25 Thread Ramprasad Prasad
I am generating pdf files with http://code.google.com/p/wkhtmltopdf/ I want to password protect the PDF's .. How can I do this ?

Re: using WWW::Mechanize why am i getting this proxy issue?

2011-11-23 Thread Rajeev Prasad
In my WWW:Mechanize script below, can someone please advice why am i getting proxy issue. when the same proxy is working fine with LWP::UserAgent in a different script. (both scripts are given below) thank you. Rajeev From: Rajeev Prasad To: perl list

using WWW::Mechanize thru proxy to https(SSL) with website/form authentication, proxy error!!

2011-11-22 Thread Rajeev Prasad
Here is the prob description in short: 1.    post your url in browser: https://myrel/files/file.doc 2.    you get a logon page (URL still looking same) 3.    enter field names:  username/password 4.    press 'ok' button (name = bsubmit)     after successful login: 5.    you get new page:    http

Re: module is installed but getting error

2011-11-22 Thread Rajeev Prasad
thanks, that was the quickest resolve for me on this LIST ever. thank you! From: Kenneth Wolcott To: Rajeev Prasad Cc: perl list Sent: Tuesday, November 22, 2011 2:35 PM Subject: Re: module is installed but getting error On Tue, Nov 22, 2011 at 12:31

module is installed but getting error

2011-11-22 Thread Rajeev Prasad
getting this error: Can't locate Http/Cookies.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./testscript.pl line 7. module was installed at: #

best module to download files from https

2011-11-21 Thread Rajeev Prasad
hello, what would be the best module to download a file from an https://url ? I am trying to download some files over secured website and am willing to try the most correct (no overkill) module for the job. task: to download files from secured websites, using perl script:  https://myurl/file.

Re: is this ssh happenign in parallel? [SOLVED]

2011-11-19 Thread Rajeev Prasad
uot;$host $line";             }             @CMDRESULT = "";             if (defined $CMDERR ) {print MFOH "$host $CMDERR \n"; $CMDERR = "";}             }         }         undef $MFSSH;     $pm->finish;     } ... ... no need to use ssh::parallel

Re: is this ssh happenign in parallel?

2011-11-16 Thread Rajeev Prasad
but not working??? @result = $pssh->run; thx. Rajeev From: salva To: beginners@perl.org Sent: Thursday, November 10, 2011 4:51 AM Subject: Re: is this ssh happenign in parallel? On Nov 8, 12:56 am, rp.ne...@yahoo.com (Rajeev Prasad) wrote: > using t

Re: is this ssh happenign in parallel?

2011-11-13 Thread Rajeev Prasad
les appending the name of the remote hosts to the local file names. The variables HOST, USER, PORT and LABEL are predefined. ____ From: Rajeev Prasad To: salva ; "beginners@perl.org" Sent: Thursday, November 10, 2011 8:50 AM Subject: Re: is this ssh happenign

Re: is this ssh happenign in parallel?

2011-11-10 Thread Rajeev Prasad
: Thursday, November 10, 2011 4:51 AM Subject: Re: is this ssh happenign in parallel? On Nov 8, 12:56 am, rp.ne...@yahoo.com (Rajeev Prasad) wrote: > using the async option in Net::OpenSSH > > can someone help me understand whether in second loop commands are being > executed without waiting

Re: is this ssh happenign in parallel?

2011-11-08 Thread Rajeev Prasad
Hi, thx for advice, ye sit is part of code, code is working fine. i will fix CAPS on variables soon. quote is fixed. From: Brandon McCaig To: Rajeev Prasad Cc: perl list Sent: Tuesday, November 8, 2011 11:01 AM Subject: Re: is this ssh happenign in parallel

  1   2   3   >