Eric Krause wrote:
Hello all,
Hello,
I have two quick questions that I would love some help on. I have looked
at the manual (Programming Perl) and I didn't get it, hence my email.
Question 1 - How can I make variables in a function (subroutine) global
(accessible from other functions)?
A
On Mon, 2008-12-22 at 15:18 -0700, Eric Krause wrote:
> Hello all,
> I have two quick questions that I would love some help on. I have looked
> at the manual (Programming Perl) and I didn't get it, hence my email.
>
> Question 1 - How can I make variables in a function (subroutine) global
> (acc
Hello all,
I have two quick questions that I would love some help on. I have looked
at the manual (Programming Perl) and I didn't get it, hence my email.
Question 1 - How can I make variables in a function (subroutine) global
(accessible from other functions)?
Question 2 - I am trying to con
sheesh - that's a lot easier then the way I do it :P
thanks.
~Eric
On Tuesday, April 2, 2002, at 07:09 PM, John W. Krahn wrote:
> Glenn Cannon wrote:
>>
>> Hi all,
>
> Hello,
>
>> Couple of questions from a newbie...
>>
>> 1) How can I print the current directory name?
>
> use Cwd;
> my $dir =
Glenn Cannon wrote:
>
> Hi all,
Hello,
> Couple of questions from a newbie...
>
> 1) How can I print the current directory name?
use Cwd;
my $dir = cwd;
print "The current directory is $dir\n";
> 2) How can I check to see if a file I know the name of exists?
if ( -e $filename ) {
pri
PROTECTED]
Subject: Re: 2 questions
Glenn..
to print the current directory name...try
---
#!/usr/bin/perl -w
use strict;
use Cwd;
$curr = cwd();
print "$curr\n";
easy enough
this is bit longer example.. you could prolly do it another way..but
this is how *I* would do it
---
#!/usr/b
Glenn..
to print the current directory name...try
---
#!/usr/bin/perl -w
use strict;
use Cwd;
$curr = cwd();
print "$curr\n";
easy enough
this is bit longer example.. you could prolly do it another way..but
this is how *I* would do it
---
#!/usr/bin/perl -w
use strict;
use Cwd;
my $cur
Hi all,
Couple of questions from a newbie...
1) How can I print the current directory name?
2) How can I check to see if a file I know the name of exists?
Thx,
Glenn
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- Naveen Parmar <[EMAIL PROTECTED]> wrote:
> 1) How do you define global & lexical variables in Perl?
> 2) Is the arrow (->) a commonly used Perl operator?
>
> TIA,
> - NP
Global variables may be defined in several different manners.
1. Fully qualified with package name:
package Foo;
ule that acts like an object).
Rob
-Original Message-
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 5:40 PM
To: [EMAIL PROTECTED]
Subject: 2 questions
1) How do you define global & lexical variables in Perl?
2) Is the arrow (->) a commonly used
1) How do you define global & lexical variables in Perl?
2) Is the arrow (->) a commonly used Perl operator?
TIA,
- NP
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
--
To unsubscribe, e-mail: [EMAI
}
-Original Message-
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 2:51 PM
To: [EMAIL PROTECTED]
Subject: 2 Questions
1) Double clicking my Perl file within Windows Explorer opens within the DOS
window, but then closes immediately after executio
:34 PM
To: Naveen Parmar; [EMAIL PROTECTED]
Subject: RE: 2 Questions
> 1) Double clicking my Perl file within Windows Explorer opens within the DOS
> window, but then closes immediately after execution.
>
> It flashes up on the screen and closes itself. Can I prevent this auto
&
> 1) Double clicking my Perl file within Windows Explorer opens within the DOS
> window, but then closes immediately after execution.
>
> It flashes up on the screen and closes itself. Can I prevent this auto
> termination?
`pause`;
or:
system "pause";
Although pause is not documented in eithe
1) Double clicking my Perl file within Windows Explorer opens within the DOS
window, but then closes immediately after execution.
It flashes up on the screen and closes itself. Can I prevent this auto
termination?
2) Is there any difference between using the following within Perl scripts?
""
On Thu, 18 Oct 2001, Amit Joshi wrote:
> Q1: Do we have a standard way to generate random numbers in perl ?
perldoc -f rand
perldoc -q random
> Q2: How do we run system commands from a perl program ?
perldoc -f system
perldoc -q system
(perldoc -f gives you information on the usage of a speci
Hi,
I'm very new to perl. Have following two questions:
Q1: Do we have a standard way to generate random numbers in perl ?
Q2: How do we run system commands from a perl program ?
Thanks and regards,
Amit.
_
Get your FREE downl
17 matches
Mail list logo