On 06/06/2011 05:06, eventual wrote:
> Hi,
> Looking at the combination script below, what must I do so that the output of
> Round 1, Round 2 and Round 3 are identical.
> Thanks.
>
> # script below ###
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Math::Combinatorics;
Hi,
Looking at the combination script below, what must I do so that the output of
Round 1, Round 2 and Round 3 are identical.
Thanks.
# script below ###
#!/usr/bin/perl
use strict;
use warnings;
use Math::Combinatorics;
{
Ming Qian wrote:
Dear Perl Pros:
I have a simple perl cgi web page. It contains a simple form.
Submitting it(with some POST Data) will redirect itself, insert the
data into a database but with a "thank you" message in place of the
html form.
This is all working fine. However,
when refresh the
Dear Perl Pros:
I have a simple perl cgi web page. It contains a simple form.
Submitting it(with some POST Data) will redirect itself, insert the
data into a database but with a "thank you" message in place of the
html form.
This is all working fine. However,
when refresh the browser, I get the fo
Hi Anisha,
Anisha Parveen wrote:
From the explanations given by you,I doubt if the delay is caused due to the
fact that it is executed as a unix command. Rob had explained how it
works..So can that be the reason ?
If yes, I would like to hear few alternatives, so that I can try them.
My u
Hi Owens/Rob,
Thanks for your help Rob and Owens.
$path is actually for setting the value for an user define environment
variable XYZ_PATH..it points to a lib directory (in the local machine only)
*Let me try to summarize the issue:*
Crypt is an application that is used to encrypt/decrypt the s
On Thu, Feb 12, 2009 at 05:33, Anisha Parveen
wrote:
snip
>> my $Tmpstr = `$path $HOME/bin/*crypt* -e -f $_keyfile<> $str
>> EOF`;
snip
Your first command was different. Those *s are important. Also, what
is in $path. That might will make a difference as well. I would
suggest copying thos
On Thu, Feb 12, 2009 at 06:47, Rob Dixon wrote:
snip
> The sequence starting with < in
> this case it is a Unix here-document which is process by the command shell.
> Before the command is actioned the sequence is replaced by the text between
> < code you show was equivalent to
>
> my $Tmpstr = `
Anisha Parveen wrote:
>
> I am a newbie to Perl scripting. I have a script file, with a statement as
> below, which i find takes 1sec to execute. As this is called several times
> in the script program, this is resulting in a significant delay in the
> program.
>
> As i am new to the scripting
Anisha Parveen wrote:
> Anisha Parveen wrote:
>>
>> I am a newbie to Perl scripting. I have a script file, with a statement as
>> below, which i find takes 1sec to execute. As this is called several times
>> in the script program, this is resulting in a significant delay in the
>> program.
>>
>>
To be noted :
This delay is noted only when the program is run in Solaris machine and
not in Red Hat Linux.
ALso the delay is not caused by the crypt application..since it takes one
second jus to enter into the main of the crypt program.
On Thu, Feb 12, 2009 at 3:56 PM, Anisha Parveen wrote
Hi all,
I am a newbie to Perl scripting. I have a script file, with a statement as
below, which i find takes 1sec to execute. As this is called several times
in the script program, this is resulting in a significant delay in the
program.
As i am new to the scripting language , i am unable to fi
In article <[EMAIL PROTECTED]>, Richard Lee
<[EMAIL PROTECTED]> wrote:
> While reading 'mastering perl', I run into @- and @+ for the first time.
> Trying to understand what's going on, I ran the code from the book, but
>
> $-[1] and $+[1] shoudln't match only the first match? (in this case,
> sh
John W. Krahn wrote:
Richard Lee wrote:
Thanks John for detailed explanation!!
I just dont' understand why \ (also didn't know that within [ ], \
has to be escaped.) needs to be watch out for within " " ..
\ use can be tricky, for example:
$ perl -le"print 'hello'"
hello
$ perl -le"print '
Richard Lee wrote:
Thanks John for detailed explanation!!
I just dont' understand why \ (also didn't know that within [ ], \ has
to be escaped.) needs to be watch out for within " " ..
\ use can be tricky, for example:
$ perl -le"print 'hello'"
hello
$ perl -le"print 'he\llo'"
he\llo
$ perl
John W. Krahn wrote:
Richard Lee wrote:
Took your advice and start to read 'Mastering regular expression' by
Jeffrey E.F.Friedl,
Can you explain below further?
on page, 205
push(@fields, $+) while $text =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",? #standard quoted string(with
possible co
Richard Lee wrote:
Took your advice and start to read 'Mastering regular expression' by
Jeffrey E.F.Friedl,
Can you explain below further?
on page, 205
push(@fields, $+) while $text =~ m{
"([^\"\\]*(?:\\.[^\"\\]*)*)",? #standard quoted string(with
possible comma)
| ([^,]+),?
Say you have the string "abcdefghi".
The positions in the string are:
a b c d e f g h i
^ ^ ^ ^ ^ ^ ^ ^ ^ ^
0 1 2 3 4 5 6 7 8 9
If you have the regular expression:
/(de)/
Then the match starts at position 3, moves forward two characters, and
ends at position 5, where the next match, i
Rob Dixon wrote:
Richard Lee wrote:
Rob Dixon wrote:
Perhaps it would help to think of the offset as being the index of the
points between the characters, so the start of the string is at offset
zero, after 'a' (and before 'b') is at offset one and so on. Then can
you see how offset 7 is befor
Richard Lee wrote:
Rob Dixon wrote:
Perhaps it would help to think of the offset as being the index of the
points between the characters, so the start of the string is at offset
zero, after 'a' (and before 'b') is at offset one and so on. Then can
you see how offset 7 is before 'hi' and offset
Richard Lee wrote:
John W. Krahn wrote:
Richard Lee wrote:
While reading 'mastering perl', I run into @- and @+ for the first time.
perldoc perlvar
Trying to understand what's going on, I ran the code from the book, but
$-[1] and $+[1] shoudln't match only the first match? (in this case,
Rob Dixon wrote:
Richard Lee wrote:
John W. Krahn wrote:
Richard Lee wrote:
While reading 'mastering perl', I run into @- and @+ for the first
time.
perldoc perlvar
Trying to understand what's going on, I ran the code from the book,
but
$-[1] and $+[1] shoudln't match only the first mat
Richard Lee wrote:
John W. Krahn wrote:
Richard Lee wrote:
While reading 'mastering perl', I run into @- and @+ for the first time.
perldoc perlvar
Trying to understand what's going on, I ran the code from the book, but
$-[1] and $+[1] shoudln't match only the first match? (in this case,
John W. Krahn wrote:
Richard Lee wrote:
While reading 'mastering perl', I run into @- and @+ for the first time.
perldoc perlvar
Trying to understand what's going on, I ran the code from the book, but
$-[1] and $+[1] shoudln't match only the first match? (in this case,
shoudln't it be, 7 t
Richard Lee wrote:
While reading 'mastering perl', I run into @- and @+ for the first time.
perldoc perlvar
Trying to understand what's going on, I ran the code from the book, but
$-[1] and $+[1] shoudln't match only the first match? (in this case,
shoudln't it be, 7 to 8 ?, instead of 7 to
While reading 'mastering perl', I run into @- and @+ for the first time.
Trying to understand what's going on, I ran the code from the book, but
$-[1] and $+[1] shoudln't match only the first match? (in this case,
shoudln't it be, 7 to 8 ?, instead of 7 to 9 ?)
--code--
#!/usr/bin/perl
$alphabet
On Jan 29, 2008 1:26 AM, Andrew Limareff <[EMAIL PROTECTED]> wrote:
> Chas. Owens wrote:
>
> > You initialize a hash with a list. So if you want an empty hash then
> > you need to assign an empty list to it:
> >
> > %hash = ();
> >
>
> Couldn't you go
>
> undef( %hash );
>
> to get an undefined re
Chas. Owens wrote:
You initialize a hash with a list. So if you want an empty hash then
you need to assign an empty list to it:
%hash = ();
Couldn't you go
undef( %hash );
to get an undefined ref - leaving the old contents for the system to
free up?
--
To unsubscribe, e-mail: [EMAIL PR
not what you wanted.
On Jan 18, 2008, at 8:57 AM, Kevin Viel wrote:
Is there a way to empty/clear a hash in mass?
For instance:
%hash = {} ;
Might the above create an reference?
Thank you,
Kevin
Kevin Viel, PhD
Post-doctoral fellow
Department of Genetics
Southwest Foundation for Bio
On Jan 18, 2008 11:57 AM, Kevin Viel <[EMAIL PROTECTED]> wrote:
> Is there a way to empty/clear a hash in mass?
>
> For instance:
>
> %hash = {} ;
>
>
> Might the above create an reference?
snip
The above does create a reference. In fact, the hash will now
See http://perldoc.perl.org/functions/delete.html
Generally speaking (ie yes, there are exceptions), there is no reason
to ever want to delete a variable.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Is there a way to empty/clear a hash in mass?
For instance:
%hash = {} ;
Might the above create an reference?
Thank you,
Kevin
Kevin Viel, PhD
Post-doctoral fellow
Department of Genetics
Southwest Foundation for Biomedical Research
San Antonio, TX 78227
--
To unsubscribe, e-mail: [EMAIL
""Ralph H. Stoos Jr."" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> All,
>
> I have been asked to do something in Access or Excel which I find
> disagreeable. Open Source is the way to go and also, PERL is more
> flexible. I might even obtain a little professional development o
Chad Perrin wrote:
: On Thu, Jun 22, 2006 at 03:07:32AM -0500, Charles K. Clarkson wrote:
::
::: OK, so here is the task. The first row I want to turn into
::: variable names. Machine, PurgeSuccess, etc.
::
:: You probably don't want to do that. You may end up needing
:: symbolic references t
xclusively, though there are plenty of other options available to you,
like MySQL.
-Original Message-
From: Ralph H. Stoos Jr. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 9:34 PM
To: beginners@perl.org
Subject: Another (hopefully more clear) plea for help with CSV data
All,
I
On Thu, Jun 22, 2006 at 03:07:32AM -0500, Charles K. Clarkson wrote:
>
> : OK, so here is the task. The first row I want to turn into
> : variable names. Machine, PurgeSuccess, etc.
>
> You probably don't want to do that. You may end up needing
> symbolic references to access those variables
Ralph H. Stoos Jr. wrote:
Perl is a name, not an acronym. Write Perl or perl, but never
PERL (unless you are yelling).
: OK, so here is the task. The first row I want to turn into
: variable names. Machine, PurgeSuccess, etc.
You probably don't want to do that. You may end up needing
s
rom file, line
by line, and test the conditions on the go.
> The original file would be left intact for another round of parsing
> with different parameters.
>
> Hope this makes it clear. I really would like to get this put up on
> one of my Linux servers so that the developers co
he user.
Processing
for each row:
if Machine = "blah" AND Purge Success = "Y" and PPM = "120 etc.
The original file would be left intact for another round of parsing with
different parameters.
Hope this makes it clear. I really would like to get this put up on one
of my L
Hi ALL,
it is puzzling. I am trying to generate passwords,
but it is not working, it generates but no
authetication
when I put the string in to postfix db.
Any idea.
-Mehmet
#!/usr/bin/perl -w
$pwin=;
@pool=(('a'..'z'), ('A'..'Z'),('0'..'9'), ".", "/");
$salt="";
[EMAIL PROTECTED](@pool)].$salt;
in Beitrag [EMAIL PROTECTED]
schrieb Jensen Kenneth B Sra Afpc/Dpdmpq unter
[EMAIL PROTECTED] am 02.01.2003 15:25 Uhr:
> Is there a perl command equivalent to:
> system ("clear");
> ?
>
> Thanks,
> Ken
>
>
Simple write it as a system call
#!/usr/bin/perl -
On Fri, Jan 03, 2003 at 10:52:27AM -0500, [EMAIL PROTECTED] wrote:
> the system "clear" command merely echo's 2 escape sequences to screen, which
> are very easy to do by hand. This is idential to what clear does:
>
> print "\e[H\e[2J";
Or let clear tell
the system "clear" command merely echo's 2 escape sequences to screen, which
are very easy to do by hand. This is idential to what clear does:
print "\e[H\e[2J";
-gomes
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ink that, in
> general, Unix terminals do but Windows has to have the ansi.sys driver
> loaded) you can do:
>
> my $clear = "\e[2J";
> print $clear;
>
> HTH,
>
> Rob
>
> "Jensen Kenneth B Sra Afpc/Dpdmpq" <[EMAIL PROTECTED]> wrote
000!
> So, I really don't know how to help you...
>
> Aloha => Beau.
>
> -Original Message-
> From: Jensen Kenneth B SrA AFPC/DPDMPQ
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 4:38 AM
> To: [EMAIL PROTECTED]
> Subject: R
If your terminal supports ANSI escape sequences (and I think that, in
general, Unix terminals do but Windows has to have the ansi.sys driver
loaded) you can do:
my $clear = "\e[2J";
print $clear;
HTH,
Rob
"Jensen Kenneth B Sra Afpc/Dpdmpq" <[EMAIL PROTECTED]&g
rsday, January 02, 2003 4:26 AM
To: '[EMAIL PROTECTED]'
Subject: Clear command in perl?
Is there a perl command equivalent to:
system ("clear");
?
Thanks,
Ken
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To un
Is this too messy for you?
print "\n" for (1..100);
(at lease it's portable!)
Aloha => Beau.
-Original Message-
From: Jensen Kenneth B SrA AFPC/DPDMPQ
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:26 AM
To: '[EMAIL PROTECTED]'
Subject:
$scr->clrscr();
It does NOT work on Windows 2000!
So, I really don't know how to help you...
Aloha => Beau.
-Original Message-
From: Jensen Kenneth B SrA AFPC/DPDMPQ
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:38 AM
To: [EMAIL PROTECTED]
Subject: RE: Clear com
Mostly for portability. Also just like to stray away from using system
commands when at all possible.
-Original Message-
From: Beau E. Cox [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 8:35 AM
To: Jensen Kenneth B SrA AFPC/DPDMPQ; [EMAIL PROTECTED]
Subject: RE: Clear
Hi -
Yes: system ("clear");
:)
I don't really know, but what is wrong with
the 'system' approach? The overhead should
be minimal since 'clear' is embedded in the
shell. Are you worried about portability?
system ($^O =~ /win32/i ? 'cls' : 'clea
Is there a perl command equivalent to:
system ("clear");
?
Thanks,
Ken
Hi everyone,
I have a couple of questions;
1) is there a command to clear the screen from within a perl program
2) how can you send the ouptput to the printer from within a perl program
I am running perl on windows.
Thanks
-
Do you Yahoo!?
Yahoo! Mail Plus
use warnings;
use strict;
my @arr=(1,2,3);
print "orig",@arr,"\n";
@arr=(); # clear the array
print "now",@arr,'\n";
--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi
> Suppose i have an array a[0]=1,a[1]=45,a[3]=78
> Is th
On Thu, 12 Sep 2002, [EMAIL PROTECTED] wrote:
> Hi
> Suppose i have an array a[0]=1,a[1]=45,a[3]=78
> Is there a way to clear the @a array with just one command? so i can for
> example
> assingn new values like a[0]=10,a[1]=90 and for example leave a[3] empty
> Something
Hi
Suppose i have an array a[0]=1,a[1]=45,a[3]=78
Is there a way to clear the @a array with just one command? so i can for
example
assingn new values like a[0]=10,a[1]=90 and for example leave a[3] empty
Something like clear @a;
Tanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Here's another way, which I suppose is simply an alternative to the system call:
Notice how you just print the *value* from the captured backtick in the following
line:
perl -e '$c=`clear`; print "Testing ...\n"; sleep 1 ; print $c;'
Matt
--- Hewlett Pickens
If you don't already have it, invest some coin in the 3rd edition of
'Programming Perl'.
-_-Aaron
-Original Message-
From: Hewlett Pickens [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 2:15 PM
To: [EMAIL PROTECTED]; zPerl Beginners
Subject: RE: How to issu
>>Read 'perldoc perlpod' for a description of the markup
Thank you. That clears up my mis-understanding and provides a lot more
information besides.
As time goes by, things gradually becoming less murky. Am still "on my back
flailing with arms and legs", but getting closer to the "crawling"
On Feb 21, Hewlett Pickens said:
> Items like C and C have meant nothing when I've come
>across them. Now - it dawns on me that they are "c" calls.
No, you're looking at raw Pod markup. It's like seeing whoa
instead of rendered HTML.
C<...> means that the text should be shown in monospace
Thank you - the system("clear")did the trick.
And Aaron Shurts' suggestion about reading perldoc resolved a "reading
problem" I've been having.
Items like C and C have meant nothing when I've come
across them. Now - it dawns on me that they are "c&q
Try typing this at the command line:
$ perldoc -f system
;-)
-_-Aaron
-Original Message-
From: Hewlett Pickens [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:26 AM
To: zPerl Beginners
Subject: How to issue CLEAR command from Perl
Invoking a Perl script from a
use system("clear")
system displays output to the terminal where ` (backtick) returns the output
to the perl script not the terminal.
-Original Message-
From: Hewlett Pickens [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 2:26 PM
To: zPerl Beginners
Subject: Ho
Invoking a Perl script from a TN3270 terminal (Linux/390)
Want to issue the shell "clear" command to clear the screen.
Using Bash shell 1.14.7(1)
"clear" works ok from the command line.
Does not clear the screen when issued from the script. Displays1
instead
Have t
> -Original Message-
> From: Barry Carroll [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 9:40 AM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: Clear
>
>
> I'd recommend that you do something like this:
>
> 1-ass
I'd recommend that you do something like this:
1-assign the text clear into a variable, this will save time later on...
eg:
$clearScreen = "clear";
Then:
system($clearScreen);
will clear the screen when ever you want to do so - this is just the way i
do it...
probably better w
In DOS
system("cls");
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2001 14:35
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Clear
You use the "clear" command.
system("clear");
I'm not sure wh
You use the "clear" command.
system("clear");
I'm not sure what it is to clear the screen in dos.
--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com
On Mon, 20 Aug 2001 08:33:42 -0500
[EMAIL PROTECTED] wrote:
> I am writing lines
I am writing lines of information to the STDOUT(Screen). In Unix k-shell
I can execute the "clear" command to remove all lines from the screen. How
is this done in Perl?
Thanks
Robert ( Kent ) Collins: IBM Certified Solutions Expert
Cell Phone: 214.632.3940
DBA Intranet
Hmm... this used to work in old dos:
cls > clear.txt
type clear.txt
This would clear the screen. Now you just get an ascii representation of the clear
code.
Does this mean than that you cannot clear the screen in Win32 just by printing an
ascii sequence?
Or perhaps we need
devic
pose to.
MF> Given the code shown, you have to print $clear for the screen to actually be
MF> cleared. The backticks are there intentionally; they're there to retrieve
MF> the sequence required to clear the screen once, so it can be stored in
MF> $clear and used as many times as des
On Mon, Jul 02, 2001 at 12:24:15PM -0700, Wagner-David wrote:
> You are correct. I believe that the backticks work on the shell, so
> I replace `cls` with system("cls") and at least my screen cleared as it was
> suppose to.
Given the code shown, you have to print $clea
On Mon, 2 Jul 2001, Craig S Monroe wrote:
> Someone posted this to the list a couple of weeks back.
> It does not appear to be working
> I cannot seem to find the reference to $^0
>
> my $clear;
> if ($^O =~ /mswin/i || $^O =~ /dos/i) {
> $clear = `cls`;
>
Beginners@Perl (E-mail)
Subject: Agnostic clear command...
Someone posted this to the list a couple of weeks back.
It does not appear to be working
I cannot seem to find the reference to $^0
my $clear;
if ($^O =~ /mswin/i || $^O =~ /dos/i) {
$clear = `cls`;
}
elsif ($^O eq 'linux'
Someone posted this to the list a couple of weeks back.
It does not appear to be working
I cannot seem to find the reference to $^0
my $clear;
if ($^O =~ /mswin/i || $^O =~ /dos/i) {
$clear = `cls`;
}
elsif ($^O eq 'linux') {
$clear = `clear`;
}
Thanks...
Craig
[EMAIL PROTEC
On Wed, 27 Jun 2001, jaya kumaran <[EMAIL PROTECTED]> wrote,
> Hi all,
>
>I used this instruction to clear the screen on NT
>
>system(cls);
>print "Hello";
>
> the same instruction is not working on unix. I modified the instruction
>I used this instruction to clear the screen on NT
>
>system(cls);
>print "Hello";
>
> the same instruction is not working on unix. I modified the
instruction to
>
> system(clear);
> print "hello";
>
> This works fine on u
Hi all,
I used this instruction to clear the screen on NT
system(cls);
print "Hello";
the same instruction is not working on unix. I modified the instruction to
system(clear);
print "hello";
This works fine on unix. Is there any instructi
78 matches
Mail list logo