perl or python

2010-10-05 Thread Kaushal Shriyan
Hi Is it better to learn Perl or Python since i can manage only writing simple bash shell scripts. Please suggest/guide. Thanks and Regards Kaushal -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: chomp () function

2010-08-29 Thread Kaushal Shriyan
On Sun, Aug 29, 2010 at 7:58 PM, Chas. Owens wrote: > On Sun, Aug 29, 2010 at 09:41, Kaushal Shriyan > wrote: > snip >> Thanks a lot Chas. Understood now. >> Also what does $_ default variable means exactly, any example would >> really help me understand it > sn

Re: chomp () function

2010-08-29 Thread Kaushal Shriyan
On Sun, Aug 29, 2010 at 7:06 PM, Chas. Owens wrote: > On Sun, Aug 29, 2010 at 09:23, Kaushal Shriyan > wrote: >> On Sun, Aug 29, 2010 at 6:11 PM, Chas. Owens wrote: >>> On Sun, Aug 29, 2010 at 07:15, Kaushal Shriyan >>> wrote: >>>> Hi >>>&

Re: chomp () function

2010-08-29 Thread Kaushal Shriyan
On Sun, Aug 29, 2010 at 6:11 PM, Chas. Owens wrote: > On Sun, Aug 29, 2010 at 07:15, Kaushal Shriyan > wrote: >> Hi >> >> Can someone please explain me with an example of the usage chomp () >> builtin function in perl. > snip > > The chomp function remo

chomp () function

2010-08-29 Thread Kaushal Shriyan
Hi Can someone please explain me with an example of the usage chomp () builtin function in perl. Thanks Kaushal -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

collectd application

2010-06-17 Thread Kaushal Shriyan
Hi, For example I do wget -O file.png "http://collectd.example.com/collectd/cgi-bin/collection.cgi?action=show_plugin;host=testdb;timespan=day;plugin=mysql"; for a single host "testdb" and plugin "mysql" I do /usr/bin/mime-construct --header 'Sender: mor_...@test.com' --header 'From: mor_...@tes

directory exists

2009-12-02 Thread Kaushal Shriyan
Hi, I have binary files 20080630 under a particular directory (/mnt/data1/adserver/BinaryAdLogs) and there is a directory by the name 2008_6_30 in /mnt/data1/adserver/DailyLogs Basically i need to check the directory whether it exists in /mnt/data1/adserver/DailyLogs for all the binary files loca

Re: rsync perl script

2008-03-21 Thread Kaushal Shriyan
sults in the @info. > > On Fri, Mar 21, 2008 at 3:07 PM, Kaushal Shriyan > <[EMAIL PROTECTED]> wrote: > > Hi > > > > [EMAIL PROTECTED] > > 0 18 * * * rsync -av /var/lib/mysql [EMAIL PROTECTED]:/var/lib/ > > > > If i put this two lines in crontab it

rsync perl script

2008-03-21 Thread Kaushal Shriyan
Hi [EMAIL PROTECTED] 0 18 * * * rsync -av /var/lib/mysql [EMAIL PROTECTED]:/var/lib/ If i put this two lines in crontab it will run correctly,My requirement was to create a perl script, this perl script should indicate success or failures and the reason for failure Any ideas Thanks and Regards

Re: FileHandle

2007-11-01 Thread Kaushal Shriyan
see there is no text "write some text" at the end of the file. what I am doing wrong. Thanks and Regards Kaushal On 11/1/07, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Kaushal Shriyan wrote: > > Hi > > > > I am using FileHandle, Below is my code > &

FileHandle

2007-11-01 Thread Kaushal Shriyan
Hi I am using FileHandle, Below is my code #!/usr/bin/perl use warnings; use strict; open(LOGFILE, "messages") || warn "Could not open messages"; open(DATA, ">/tmp/data") || die "Could not create /tmp/data\n." while () { print "$_\n" if

Pragmas use strict and use warnings

2007-10-30 Thread Kaushal Shriyan
Hi Whats the exact purpose of use strict and use warnings Pragmas in the Perl Programming Language. I know use warnings turns on all useful warnings. Thanks and Regards Kaushal

chomp operator

2007-10-30 Thread Kaushal Shriyan
Hi, I have the below lines of code. #!/usr/bin/perl use strict; use warnings; my $text =" a line of text\n" ; chomp($text); #the chomp operator gets rid of the newline character print "$text"; My question is if i remove the new line character "\n" in the above code then i dont need the chomp op

Re: Hash Variables

2007-10-29 Thread Kaushal Shriyan
apple => "red", banana => "yellow", ); I know to use the Fat Comma Operator, How can one use the whitespace to lay the Hash Key/Values Pair. Please explain me with the above example. Thanks and Regards Kaushal On 10/29/

Hash Variables

2007-10-29 Thread Kaushal Shriyan
Hi, I have a sample code #!/usr/bin/perl -w %states = ( "California","Sacramento", "Wisconsin","Madison", "New York", "Albany"); print "Capital of California is " . $states{"California"} . "\n\n"; ###

Re: Perl Scalars

2007-10-10 Thread Kaushal Shriyan
On 10/10/07, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Kaushal Shriyan wrote: > > Hi, > > > > I am referring to http://www.gnulamp.com/perlscalars.html > > > > $a = $b; # Assign $b to $a > > > > Note that when Perl assigns a value with *$a = $b

Perl Scalars

2007-10-10 Thread Kaushal Shriyan
Hi, I am referring to http://www.gnulamp.com/perlscalars.html $a = $b; # Assign $b to $a Note that when Perl assigns a value with *$a = $b* it makes a copy of $b and then assigns that to $a. Therefore the next time you change $b it will not alter $a. I did not understand the Note:- Can some one

showmedo.com/videos

2007-10-09 Thread Kaushal Shriyan
Hi The Showmedo.com videos has only 4 parts only what about the rest of the videos or Am i seeing only 4 videos only Thanks and Regards Kaushal

Learning Perl

2007-10-07 Thread Kaushal Shriyan
Hi I do not have any experience in programming at all. How do i start learning Perl language. Can some one here point me to the right direction to learn Perl Language Thanks in Advance Thanks and Regards Kaushal

cgi script

2006-09-28 Thread Kaushal Shriyan
Hi ALL I have a issue when i use script (test.cgi) #!/bin/bash echo "Content-type: text/plain"; echo set I get all the http headers populated with the values correctly but when I use the below script (test-cgi) #!/bin/sh # disable filename globbing set -f echo Content-type: text/plain echo

Re: NetSSH

2006-09-13 Thread Kaushal Shriyan
On 9/13/06, Lee Goddard <[EMAIL PROTECTED]> wrote: > I am getting the below error > > C:\perlsc>perl sshperl1.pl > Can't locate Net/SSH/Perl.pm in @INC (@INC contains: > c:/Perl/lib c:/Perl/site/li b .) at sshperl1.pl line 1. > BEGIN failed--compilation aborted at sshperl1.pl line 1. You need to

NetSSH

2006-09-13 Thread Kaushal Shriyan
Hi ALL My sshperl1.pl file contains the below use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new($tweb33.abc.test.com); $ssh->login($user, $pass);: my($stdout, $stderr, $exit) = $ssh->cmd($cmd); I am getting the below error this is the error C:\perlsc>perl sshperl1.pl Can't locate Net/

Query

2006-05-19 Thread Kaushal Shriyan
Hi All #!/usr/bin/perl -w whats -w flag stands for and what is its use, I mean How do i use it and any other flags are also there, Please specify Thanks Kaushal -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Print

2006-05-18 Thread Kaushal Shriyan
Hi All I have perl.chm file Learning Perl, How do i print all the chapters and all pages in the perl.chm file when i click on print, only one page gets selected and in the print dialog I can see only one page How do i select all the pages so that I can print the entire book Kaushal -- To unsu

Hi

2006-05-14 Thread Kaushal Shriyan
Hi All I am a novice to perl,I would like to learn perl in a systematic way, Whats the best way to start with,I dont have any experience of programming Language, But I came to know that perl is a Good Programming Language Thanks Kaushal -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition