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
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
I think you want
%hash = ();
which will make sure there are no elements in %hash.
Your statement was
%hash = {};
In this case, the {} will return a reference to an empty hash, and
the assignment will then attempt to make this reference into a key in
%hash. Since hash keys can only be stri
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 contain
something like
%hash = (
"H
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/
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 -w
system("clear"); on UNIX
system("cl
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 you what it does:
perl -e 'my $clear =
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]
Hi Rob,
It's been awhile since my DOS days, but I believe ANSI.sys usually was loaded by
default. You usually would have to make a small bartch file to set things like screen
colors and such, though.
Joseph
Rob Dixon wrote:
> If your terminal supports ANSI escape sequences (and I think that,
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]> wrote in
message
[EMAIL PRO
Or REALLY silly:
(sleep 1 && print "\n") for (1..100);
Aloha => Beau.
PS: Been up all night getting a project ready -
I;m getting 'punchy' - going to bed...
-Original Message-
From: Jensen Kenneth B SrA AFPC/DPDMPQ
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 4:26 AM
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: Clear command in perl?
Is the
$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' : 'clear');
(tested OK Win 2000 and Linux)
Aloha => Beau.
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 there a way to clear the @a array with just one
> command? so i can
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 like clear @a;
@a = ();
> -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 ways to do it as
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 of information to the STDOUT(S
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 to
>
> system(clear);
> print "hello";
>
> This
>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 instruction in perl to perfom
clear scre
25 matches
Mail list logo