> Message du 27/08/08 21:21
> De : "Raja Vadlamudi"
> A : "Perl Beginners"
> Copie à :
> Objet : Re: sub alias name
>
> Or you might just want to use typeglob for only sub-routine.
>
> *real_long_fund = \& really_long_function_name_i_do_not_like_to_type;
>
or use an alias to the alias:
*real_lo
On Wed, 27 Aug 2008 06:29:53 -0700 (PDT), [EMAIL PROTECTED] wrote:
> Hi All,
>
> I am learning how to use Perl. When I was first time using VBA, I
> could use "F8" to track how all the variables change each by each and
> step by step so that I can understand how the whole coding flows. Is
> there
Hi Jin Hoo,
Jenda Krynicky wrote:
From: [EMAIL PROTECTED]
I am learning how to use Perl. When I was first time using VBA, I
could use "F8" to track how all the variables change each by each and
step by step so that I can understand how the whole coding flows. Is
there any method to do so (
Anirban Adhikary wrote:
> Dear List
> I have a source file as follows
> hello how are you?
> hello how are you?
> What language did you want to use?
> What language did you want to use?
> I am here
> You are there
> this is my first perl script
> What language did you want to use?
> ###
STEVEN WHALEY wrote:
>
> The program I'm trying to write requires me to grab a specific set of
> multiline output from a command and store it in an array. I have output
> that looks like this:
>
[lengthy data snipped]
>
> and make each line an entry in an array. I do not actually need the
> fir
STEVEN WHALEY wrote:
First off, hello everyone.
Hello,
The program I'm trying to write requires me to grab a specific set of
multiline output from a command and store it in an array. I have output
that looks like this:
Hosts associated with this datastore.
ag-vmsql01-srv.agbr.com
ag
On Wed, 2008-08-27 at 16:54 -0500, STEVEN WHALEY wrote:
> and make each line an entry in an array. I do not actually need the
> first two lines, but I can pop them off so grabbing them isn't a
> problem. I can get a regex to match the "Folder Path:..." line but
> I'm
> not sure how to get the res
First off, hello everyone.
The program I'm trying to write requires me to grab a specific set of
multiline output from a command and store it in an array. I have output
that looks like this:
Hosts associated with this datastore.
ag-vmsql01-srv.agbr.com
ag-vmsql01-srv.agbr.com
ag-vmsq
[ Please do not top-post. TIA ]
Raja Vadlamudi wrote:
On 8/27/08 3:02 PM, "John W. Krahn" <[EMAIL PROTECTED]> wrote:
Ryan wrote:
sub really_long_function_name_i_do_not_like_to_type {return 'data';}
can I create some kind of alias, like real_long_func ?
Using a typeglob copy:
$ perl -le
Or you might just want to use typeglob for only sub-routine.
*real_long_fund = \& really_long_function_name_i_do_not_like_to_type;
On 8/27/08 3:02 PM, "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> Ryan wrote:
>> given:
>>
>> sub really_long_function_name_i_do_not_like_to_type {return 'data';}
>
Ryan wrote:
given:
sub really_long_function_name_i_do_not_like_to_type {return 'data';}
can I create some kind of alias, like real_long_func ?
how?
Using a typeglob copy:
$ perl -le'
sub really_long_function_name_i_do_not_like_to_type { return q/data/ }
print really_long_function_name_i_do_
Of course you can...
sub really_long_function_name_i_do_not_like_to_type {return 'data';}
sub short_func { return really_long_function_name_i_do_not_like_to_type(); }
Should do the trick,
Rob
On Wed, Aug 27, 2008 at 8:44 PM, Ryan <[EMAIL PROTECTED]> wrote:
> given:
>
> sub really_long_functio
given:
sub really_long_function_name_i_do_not_like_to_type {return 'data';}
can I create some kind of alias, like real_long_func ?
how?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
zentara wrote:
On Tue, 26 Aug 2008 18:09:58 +0100, [EMAIL PROTECTED] (Aruna Goke)
wrote:
...
__END__
zentara
Thanks Zentara,
I have edited the code as below.. however, I wanted to be able to scroll
both horizontally and vertically so that i can see all the n
I have the following command that redirects output from the script to
temp.txt.
system "ssh -x -t $_ \"sudo /home/tadipah/test.sh\" > temp.txt ";
If I open the file temp.txt, I can see one word "jboss"; I tried to print
it using the code below:
open TESTFILE, "temp.txt";
@srv=; chomp(@srv);
Aruna Goke wrote:
> I am writing a raffle draw promo using perl and i have the script as below.
>
> what i intend to achieve is to print all the numbers in the array to gui
> screen, clear the screen and display randomly selected one as the winner.
>
> however, I have run my script in the cmd li
Patrick Dupre wrote:
> I am trying to explain,
>
> Here are the 2 perl subroutines:
> sub sub1 {
>my %a ;
>$a {a} = 1 ;
>$a {b} = 2 ;
>foreach (keys %a) {
> print $_, " => ", $a {$_}, "\n" ;
> }
>return \%a ;
>}
>
> sub sub2 {
>my ($h) = @_ ;
>foreach (ke
zentara wrote:
On Tue, 26 Aug 2008 18:09:58 +0100, [EMAIL PROTECTED] (Aruna Goke)
wrote:
I am writing a raffle draw promo using perl and i have the script as below.
what i intend to achieve is to print all the numbers in the array to gui
screen, clear the screen and display randomly selected
From: [EMAIL PROTECTED]
> I am learning how to use Perl. When I was first time using VBA, I
> could use "F8" to track how all the variables change each by each and
> step by step so that I can understand how the whole coding flows. Is
> there any method to do so (or similar) in Perl? Many thanks!
Arun wrote:
Hi,
i am new to perl so i uat wanted some help.
i wanted the followinf loop to be repeated for every 30 seconds.
$send_data = strftime( "::DATA::123456789101112,%d.%m.%Y,%H:%M:%S,
13.0076367,77.5489267,0,933.4,AirTel,31,0 \n", gmtime);
DATA: {while(1)
{
$handle-
Anirban Adhikary wrote:
Dear List
Hello,
I have a source file as follows
hello how are you?
hello how are you?
What language did you want to use?
What language did you want to use?
I am here
You are there
this is my first perl script
What language did you want to use?
Hi,
i am new to perl so i uat wanted some help.
i wanted the followinf loop to be repeated for every 30 seconds.
$send_data = strftime( "::DATA::123456789101112,%d.%m.%Y,%H:%M:%S,
13.0076367,77.5489267,0,933.4,AirTel,31,0 \n", gmtime);
DATA: {while(1)
{
$handle-> send($send_d
On Wed, 2008-08-27 at 15:55 +0100, Pat Rice wrote:
> Hi ya
> I put mine in if statements, then you can turn them of and on globally
>
> if(debug == 1){
> print "$bla"
> }
Use Data::Dumper to see all levels of a variable:
use Data::Dumper;
print '%var : ', Dumper \%var if $debug == 1;
--
Just
Hi ya
I put mine in if statements, then you can turn them of and on globally
if(debug == 1){
print "$bla"
}
hope that helps
Pat
On Wed, Aug 27, 2008 at 3:47 PM, Jeff Pang <[EMAIL PROTECTED]> wrote:
>
>> Message du 27/08/08 16:31
>> De : [EMAIL PROTECTED]
>> A : beginners@perl.org
>> Copie à :
>>
I am trying to explain,
Here are the 2 perl subroutines:
sub sub1 {
my %a ;
$a {a} = 1 ;
$a {b} = 2 ;
foreach (keys %a) {
print $_, " => ", $a {$_}, "\n" ;
}
return \%a ;
}
sub sub2 {
my ($h) = @_ ;
foreach (keys %$h) {
print $_, " => ", $$h {$_}, "\n" ;
}
}
+++
> Message du 27/08/08 16:31
> De : [EMAIL PROTECTED]
> A : beginners@perl.org
> Copie à :
> Objet : Question on Perl
>
>
> Hi All,
>
> I am learning how to use Perl. When I was first time using VBA, I
> could use "F8" to track how all the variables change each by each and
> step by step so that I
> hello,
>
> how to encrypt a text file and decrypt it with perl?
>
> for example, I have a config file,
>
> svr.conf
>
> I want to encrypt it to svr.conf.encrypt.
>
> But I should also have the ability to decrypt the encryped one to the
> original text.
>
> Any suggestion is welcome. than
On Wed, 2008-08-27 at 06:29 -0700, [EMAIL PROTECTED] wrote:
> Hi All,
>
> I am learning how to use Perl. When I was first time using VBA, I
> could use "F8" to track how all the variables change each by each and
> step by step so that I can understand how the whole coding flows. Is
> there any met
Hi All,
I am learning how to use Perl. When I was first time using VBA, I
could use "F8" to track how all the variables change each by each and
step by step so that I can understand how the whole coding flows. Is
there any method to do so (or similar) in Perl? Many thanks!
Best regards,
Ronald
Hi
The program is called "screen" just in case you are looking fo it. The first
sentence from the man page says
"Screen is a full-screen window manager that multiplexes a physical terminal
between several processes (typically interactive shells)."
On Linux I also use Ctrl-Z whrn in vim to go o
[EMAIL PROTECTED] wrote:
how to encrypt a text file and decrypt it with perl?
for example, I have a config file,
svr.conf
I want to encrypt it to svr.conf.encrypt.
But I should also have the ability to decrypt the encryped one to the
original text.
when using crypt
Patrick Dupre wrote:
> Rob Dixon wrote:
>>
>> It would be nice to have been told the symptoms you are getting, as your code
>> looks basically correct.
>>
>> All I can see that is wrong is that you need to add PUSHMARK(SP) before the
>> call to the Perl subroutine to mark the end of any parameter
Hello Rob,
I am trying to investigate more, but, one problem seems to that that the
SvTYPE (ret) is 3, ie that it is a RV reference when it should be a
hash reference. Am I correct ?
Patrick Dupre wrote:
I am desesperated !
Assuming the following perl sub:
sub sub1 {
my %a ;
$a {a} = 1
On Tue, 2008-08-26 at 22:31 -0600, Dan Baker wrote:
> There must be some really odd stuff going on with html encoding or regx!
> Anyway, if I change my match to :: I can now catch the situation... not
> that I understand how a ' gets changed to ::
In Perl version 4, a single quote was use to de-re
Patrick Dupre wrote:
>
> I am desesperated !
>
> Assuming the following perl sub:
> sub sub1 {
>my %a ;
>$a {a} = 1 ;
>$a {b} = 2 ;
>foreach (keys %a) {
> print $_, " => ", $a {$_}, "\n" ;
> }
>return \%a ;
>}
>
> Using XS, I am tring to get the hash using:
>
> Message du 27/08/08 11:51
> De : "Irfan J Sayed (isayed)"
> A : "Jeff Pang"
> Copie à : beginners@perl.org
> Objet : RE: perl script on remote server linux
>
>
>
> Thanks Jeff. It really helped.
> Just one doubt, if we can perform operation with ssh then why we require
> Net::SSH module??
From: Dan Baker <[EMAIL PROTECTED]>
> I have a thing driving me NUTS trying to detect a ' in a variable
> with regex, and either strip it out or at least detect and error out.
> for instance, this just does NOT work.
DO NOT TEST FOR DANGEROUS CHARACTERS! MAKE SURE YOU ONLY HAVE THE
SAFE ONE
Thanks Jeff. It really helped.
Just one doubt, if we can perform operation with ssh then why we require
Net::SSH module??
Regards
Irf.
-Original Message-
From: Jeff Pang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2008 2:32 PM
To: Irfan J Sayed (isayed)
Cc: beginners@perl.o
Raymond Wan wrote:
Assuming we are using the same ssh, isn't the login name for ssh is
supplied using the "-l" parameter (lowercase L)? Give it a try on the
command line before putting it in the script so that you can figure
out what is wrong easier.
Sorry Irfan and thanks Jeff...I was wron
Hi Irfan,
Assuming we are using the same ssh, isn't the login name for ssh is
supplied using the "-l" parameter (lowercase L)? Give it a try on the
command line before putting it in the script so that you can figure out
what is wrong easier.
Ray
Irfan J Sayed (isayed) wrote:
Hi,
In my
> system "ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat.sh";
you need a "\" before the "@".
modify it to:
system "ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat.sh";
Créez votre adresse électronique [EMAIL PROTECTED]
1 Go d'espace de stockage, anti-spam et anti-virus intégr
Hi,
In my case, the user with which I am executing the script is not there in
sudoers file. So I did in the following manner.
#!/usr/bin/perl
open FILE, "server_list" or die $!;
while() {
print "the host is: $_";
chomp;
system "ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat
El Wednesday 27 August 2008 10:20:50 Anirban Adhikary va escriure:
> Dear List
> I have a source file as follows
> hello how are you?
> hello how are you?
> What language did you want to use?
> What language did you want to use?
> I am here
> You are there
> this is my first perl script
> What lang
El Wednesday 27 August 2008 08:28:40 [EMAIL PROTECTED] va escriure:
> hello,
>
> how to encrypt a text file and decrypt it with perl?
>
> for example, I have a config file,
>
> svr.conf
>
> I want to encrypt it to svr.conf.encrypt.
>
> But I should also have the ability to decrypt the encryped one
Hello,
for removing the spaces, try s/\s//g, like:
# perl -e '$x="multi words with spaces";$x=~s/\s//g;print $x'
multiwordswithspaces
Créez votre adresse électronique [EMAIL PROTECTED]
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
Dear List
I have a source file as follows
hello how are you?
hello how are you?
What language did you want to use?
What language did you want to use?
I am here
You are there
this is my first perl script
What language did you want to use?
I want t
46 matches
Mail list logo