Yes, you don't want to print $hash{$hash_key}...instead, notice that I put a
backslash before the first $
You just want to print $hash_key. If you escape the first $ then it will
print out something like
$hash{key1} is blank!
- Original Message -
From: "Daniel Falkenberg" <[EMAIL PROTECT
Tanton,
I must be so close! I just can't get it to print the key value that
contains a null value. I think it is actually printing the value i.e
$hash{$hash_key} which is the value? I want it to print the key!
Does this sound correct to you?
Regards,
Dan
> foreach my $hash_key (keys %hash)
Loan Tran wrote:
>
> Hello all,
Hello,
> What's good way to compress a file using PERL?
PERL? You probably meant Perl.
my $file = '/home/loan/somefile.txt';
system 'bzip2', $file;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Sure, you just about have it, but don't use
$hash{$_} == ""
as someone else said, just use
$hash{$_} eq ""
Also, if you name your iterator $hash_key, then don't use $_, use
$hash_key...so the final code would be
foreach my $hash_key (keys %hash) {
if( $hash{$hash_key} eq "" ) {
print "\$ha
Hi Tanton,
Yes, but what I really want it to do is go though all the values of the
hash and if any of them contain null values then print that out and tell
me whick key(s) value(s) contains null values? Is this possible?
Therefore...
foreach $hash_key (keys %hash) {
if ($hash{$_} == "" || $h
If you want to test all of them, you can say
$hash{$_} eq "" and die "Empty hash!" foreach( keys %hash );
- Original Message -
From: "Eric Beaudoin" <[EMAIL PROTECTED]>
To: "Daniel Falkenberg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 10, 2002 2:22 AM
Subject: Re: Ch
At 02:08 2002.04.10, you wrote:
>Hey all,
>
>I have created a hash that looks similar to the following...
>
>%hash (
>'test1' => $test1,
>'test2' => $test2,
>'test3' => $test3,
>);
>
>Now is it possible to have a little piece of code check the values of
>that hash and see i
Hello all,
What's good way to compress a file using PERL?
Thanks in advance.
LT
__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-ma
Hey all,
I have created a hash that looks similar to the following...
%hash (
'test1' => $test1,
'test2' => $test2,
'test3' => $test3,
);
Now is it possible to have a little piece of code check the values of
that hash and see if their are any blank fields?
Something
On Apr 9, Ahmed Moustafa said:
>John W. Krahn wrote:
>> Ahmed Moustafa wrote:
>>
>>>Jeff, thanks a lot for your explanation. I really appreciate it.
>>>
>>>Jeff 'Japhy' Pinyan wrote:
>>>
Please use File::Basename. Save us all the headache.
>>>I was thinking that avoiding modules would
On Apr 9, Ahmed Moustafa said:
>Jeff, thanks a lot for your explanation. I really appreciate it.
>
>Jeff 'Japhy' Pinyan wrote:
>> Please use File::Basename. Save us all the headache.
>
>I was thinking that avoiding modules would make the code more portable.
>Am I right?
File::Basename is a STA
Daniel Falkenberg wrote:
>
> Hey all,
Hello,
> $card_no = "1234567901234567" # 16 digit number
>
> How would I go about splitting that number into an array?
$ perl -le '$card_no = "1234567901234567";
@array = split //, $card_no;
print "@array";
@array = $card_no =~ /./g;
print "@array";
@arr
Ooops! Correction:
Incorrect -- connect("DBI:mysql:HOST", "DB", 'DB_PASSWORD');
Should be -- connect( "dbi:mysql:dbname", "username", 'DBpassword');
Ron
===
"Ron" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
This is my two-
On Tuesday 09 April 2002 11:58 pm, Kevin Queen wrote:
> I installed Perl 5.6.1 and now none of my Perl programs run. It would
> appear that my @INC directive is being ignored. None of my scripts find
> strict.pm, vars.pm, or any .pm for that matter. How can I fix this?
Let me guess, are you on
@array = split("", $card_no);
Tor.
Daniel Falkenberg wrote:
>
> Hey all,
>
> $card_no = "1234567901234567" # 16 digit number
>
> How would I go about splitting that number into an array?
>
> Regards,
>
> Dan
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-m
Hi,
perl -e '$r="123456789012345"; @Re=split(//,$r); print join ("|",@Re);'
HTH,
-tir
>
Ol=10 Apr 2002, Daniel Falkenberg wrote:
>t(//,$r); print join ("|",@Re);'
> Hey all,
>
> $card_no = "1234567901234567" # 16 digit number
>
> How would I go about splitting that number into an
Hey all,
$card_no = "1234567901234567" # 16 digit number
How would I go about splitting that number into an array?
Regards,
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I installed Perl 5.6.1 and now none of my Perl programs run. It would appear
that my @INC directive is being ignored. None of my scripts find strict.pm,
vars.pm, or any .pm for that matter. How can I fix this?
Thanks,
Kevin Q.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
Strangly, I received errors at first, but now not. It must have been
another part of the code.
-
Not that I can see...are you getting an error?
-Original Message-
From: Michael Gargiullo
To: Beginners
Sent: 4/9/02 8:11 PM
Subject: declaring vars
I though I could define variable
The x operator takes a string and a number and repeats the string number
times.
For example:
print "dog" x 3;
prints: dogdogdog
You can look at
perldoc perlop
or buy Learning Perl from O'Reilly.
- Original Message -
From: "Glenn Meyer" <[EMAIL PROTECTED]>
To: "Beginners" <" <[EMAIL PR
Please, tell me what your are doing here. I have seen similar short code
before but have no idea how to read it or why it works. Can you point me to
docs or a boox the would help? Thanks!
On Tuesday 09 April 2002 10:14 pm, Tanton Gibbs wrote:
> print "-" x 80;
> - Original Message -
Not that I can see...are you getting an error?
-Original Message-
From: Michael Gargiullo
To: Beginners
Sent: 4/9/02 8:11 PM
Subject: declaring vars
I though I could define variables this way.
Do I have the syntax wrong?
our($opt_s, $opt_v, $opt_w, $opt_L, $opt_l, $opt_a);
-Mike
__
John W. Krahn wrote:
> Ahmed Moustafa wrote:
>
>>Jeff, thanks a lot for your explanation. I really appreciate it.
>>
>>Jeff 'Japhy' Pinyan wrote:
>>
>>>Please use File::Basename. Save us all the headache.
>>>
>>I was thinking that avoiding modules would make the code more portable.
>>Am I right?
Ahmed Moustafa wrote:
>
> Jeff, thanks a lot for your explanation. I really appreciate it.
>
> Jeff 'Japhy' Pinyan wrote:
> > Please use File::Basename. Save us all the headache.
>
> I was thinking that avoiding modules would make the code more portable.
> Am I right?
No, _using_ modules woul
Hello all,
I am just playing around with forms at the moment. What I want to do is
have user enter data into form fiels then I want to validate that
entered date. So far I can do things as basic as validating if fields
contain characters and so forth. But what I want to do is something
like th
Thank you
___
print "-" x 80;
- Original Message -
From: "Michael Gargiullo" <[EMAIL PROTECTED]>
To: "Beginners" <[EMAIL PROTECTED]>
Sent: Tuesday, April 09, 2002 11:13 PM
Subject: shrinking code
> How can I write this smaller?
>
> while($m < 80){
> pr
print "-" x 80;
- Original Message -
From: "Michael Gargiullo" <[EMAIL PROTECTED]>
To: "Beginners" <[EMAIL PROTECTED]>
Sent: Tuesday, April 09, 2002 11:13 PM
Subject: shrinking code
> How can I write this smaller?
>
> while($m < 80){
> print "-";
> $m++
> }
>
> --
> To unsubscribe, e
How can I write this smaller?
while($m < 80){
print "-";
$m++
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I though I could define variables this way.
Do I have the syntax wrong?
our($opt_s, $opt_v, $opt_w, $opt_L, $opt_l, $opt_a);
-Mike
_
Nothing is fool proof to a sufficiently talented fool!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
Jeff, thanks a lot for your explanation. I really appreciate it.
Jeff 'Japhy' Pinyan wrote:
> Please use File::Basename. Save us all the headache.
I was thinking that avoiding modules would make the code more portable.
Am I right?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
volks,
I think we need to address Gary Hawkin's questions about the package
'function'
beyond the obligatory cf. perldoc -f package - and folks SHOULD check it
out.
it gives the simple introduction to doing 'name space management' -
one of the reasons that 'lexical scoping' is IMPORTANT
Hi,
Taint checking has got me stumped.
I'm using CGI to bring in a variable amount of data from
a Textarea in a form.
What's the best way to untaint a bunch of words?
They may or may not span multiple lines.
Everything I've tried will give me $1 being just the
first word.
For example:
if ($comme
On Tuesday, April 9, 2002, at 11:13 , Jenda Krynicky wrote:
[..]
> So if a module defines several classes it has to contain several
> packages.
>
> Jenda
yes I think I would modify that slightly
it is simpler to deliver one long file as a singular 'package'
that carries with
On Apr 10, Daniel Falkenberg said:
>I just tried running $money = s/\$//: over
It should be =~ not =.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in P
Hi Tim,
I just tried running $money = s/\$//: over
$money = "$21.80";
And my returned result was nothing! I.e it removed everything?
Any ideas,
Dan
On Wed, 2002-04-10 at 09:34, Timothy Johnson wrote:
>
> You have to escape the dollar sign in your regex just like you did in the
> assignment
The following sort-code came from an old CPAN page. It seems to work just
fine (it sorts a tab-delimited text file by the 3rd column), but if I have
warnings (-w) turned on the compiler throws a whole bunch of "Use of
uninitialized value" warnings about the line that starts "@newrefs ".
What
From: "Leon" <[EMAIL PROTECTED]>
> - Original Message -
> From: "zentara" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > In the html page where you set up the original frameset, you assign
> > names, like header, left and right to the individual fr
Bryan R Harris wrote:
>
> > Bryan R Harris wrote:
> > >
> > > I suppose it does look a little bizarre. Actually, my goal is a little
> > > more complex. We have a simulation that outputs data files, but often up
> > > to 90% of the data is redundant. So I'm trying to write a filter for the
> >
- Original Message -
From: "zentara" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> In the html page where you set up the original frameset, you assign names,
> like header, left and right to the individual frames. So you either make
your
> links and forms point to the
You have to escape the dollar sign in your regex just like you did in the
assignment.
$money = s/\$//;
-Original Message-
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 5:10 PM
To: [EMAIL PROTECTED]
Subject: Regex!
Hello All,
Just wondering how I can
Hello All,
Just wondering how I can remove unwanted characters from a simple
variable.
$money = "\$21.85";
Now I simply want to strip the $ sign from that variable.
Easy? Well I thought it would be :)
$money = s/$//; # Well thats what I thought!
Regards,
Dan
--
To unsubscribe, e-mail:
On Apr 9, Gary Hawkins said:
>> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
>>
>> Perhaps you're missing the point.
>
>Gee, maybe that was the reason for the question. Ya think? Why do you
>hammer people for asking questions, that's what this place is for.
I wasn't. I was saying that
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 09, 2002 11:58 AM
> To: Gary Hawkins
> Cc: [EMAIL PROTECTED]
> Subject: RE: Scope of variables. Lost in subs
>
> Perhaps you're missing the point.
Gee, maybe that was the reason for the ques
@fro @ndy [[EMAIL PROTECTED]] quoth:
*>
*>My friend said that you cant use sendmail on a Windows machine so i am asking if
this is true. If it is true are there any sendmail programs out there that would work
with my current OS?
Not true but you'd have to install it and, as I recall, it's a com
On Apr 9, Michael Gargiullo said:
>While asking a few questions to run a script. How can I give a default
>answer?
>
>print "File to use:";
>chomp(my $question = );
Most programs do it like so:
my $default = "/foo/bar/blat";
print "File to use? [$default] ";
chomp(my $question = );
$
I usually display what the defaults are at first and then use a carriage
return to signify that is what I want.
You can test like:
if ( $question eq '' ) {
# place the default value into $question
}
I usually use a infinite loop and when values
Hello,
I am running Apache HTTP Server Version 1.3 on my Windows 2000 Professional PC with
ActiveState Perl. I was wondering if anyone knew where my SendMail program would be
located?
My friend said that you cant use sendmail on a Windows machine so i am asking if this
is true. If it is true
On Apr 9, Michael Gargiullo said:
>While asking a few questions to run a script. How can I give a default
>answer?
>
>print "File to use:";
>chomp(my $question = );
Most programs do it like so:
my $default = "/foo/bar/blat";
print "File to use? [$default] ";
chomp(my $question = );
$q
While asking a few questions to run a script. How can I give a default
answer?
Right now I'm asking my question like so:
print "File to use:";
chomp(my $question = );
-Mike
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Apr 9, Raghupathy, Ramesh . said:
> I am trying to translate the abbreviation of the form A(4) to . I
>tried substitution as follows:
>$wholefile =~ s/(\w)\((\d+)\)/$1{$2}/g;
It seems like you think that x{y} syntax used in a regex can be used
elsewhere -- nope. Instead, you need to u
Hi,
I am trying to translate the abbreviation of the form A(4) to . I
tried substitution as follows:
$wholefile =~ s/(\w)\((\d+)\)/$1{$2}/g;
This results in the abbrevation being replaced by spaces. How can I get this
to work ?
Thanks,
Ramesh
--
To unsubscribe, e-mail: [EMAIL PROTE
Thanx... didn't know that it was an empty list... I thought it was ''
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 09, 2002 5:18 PM
> To: Nikola Janceski
> Cc: '[EMAIL PROTECTED]'; 'Beginners (E-mail)'
> Subject: RE: rewrite without us
On Apr 9, Nikola Janceski said:
>Why are there still no empty elements in the returned array for the items
>that didn't match the pattern?
>> No; as my post stated, doing LIST = map BLOCK LIST; puts BLOCK in list
>> context. A regex in list context will return the parenthetical
>> captures if
I have to sort before I remove the lines at the top because the lines that
have the zeros in column 5 are not at the top. The whole point of the task
is not to sort the data, but to filter unneeded data. Some zeroes in
column 5 are okay, but the redundant ones are the ones at the top after
sort
> Why are there still no empty elements in the returned array
> for the items that didn't match the pattern? @must == 2
>
> I am just befuddled but this "paradox"
> >
> > Thus, map { m!(.*)/\*! } LIST will return $1 or () for each
> > element of the
> > LIST.
When you have
LIST2 = map { m!^(.
Why are there still no empty elements in the returned array for the items
that didn't match the pattern?
@must == 2
I am just befuddled but this "paradox"
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 09, 2002 4:27 PM
> To: Nikola Janc
On Apr 9, Nikola Janceski said:
>my bad... you are right... interesting... is this a special case where map
>return $1 instead of 1?
>or is it a special case where /(PATTERN)MOREPATTERN/ evaluates to $1 when
>true? (but why then no null elements?... interesting..
No; as my post stated, doing LIS
my bad... you are right... interesting... is this a special case where map
return $1 instead of 1?
or is it a special case where /(PATTERN)MOREPATTERN/ evaluates to $1 when
true? (but why then no null elements?... interesting..
> -Original Message-
> From: David Gray [mailto:[EMAIL PROTEC
On Apr 9, Nikola Janceski said:
>@must = map { m/(.*)\/\*/; $1 } grep m/\/\*/, @recomp;
I'd do:
@must = map m!(.*)/\*!, @recomp;
The regex is in LIST context, so if it fails, () is returned.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother
On Apr 9, Jason Larson said:
> $extension =~ s/(^.+\.?)([^\.]*)$/$2/;
>
>Your regex will fail for a couple of different reasons:
[snip]
Your regex will fail, too. Here's why... assuming $extension is
"foobar.txt", here is how the regex matches:
^ matches the beginning of the string
> map returns the result of the last evaluated statement...
> @must would have ones and zeros... I want the $1 portion but
> only if it ends in '/*' there really isn't a speed issue...
> it's more a "can i make this line look sweeter?"
>
> > > is there a way to write this without using map AND
Bryan R Harris wrote:
>
> I suppose it does look a little bizarre. Actually, my goal is a little
> more complex. We have a simulation that outputs data files, but often up
> to 90% of the data is redundant. So I'm trying to write a filter for the
> data. I have to:
>
> 1. open and load the
map returns the result of the last evaluated statement...
@must would have ones and zeros... I want the $1 portion but only if it ends
in '/*'
there really isn't a speed issue... it's more a "can i make this line look
sweeter?"
> -Original Message-
> From: David Gray [mailto:[EMAIL PROTEC
> is there a way to write this without using map AND grep AND
> without making
> it longer than it is?
> @must = map { m/(.*)\/\*/; $1 } grep m/\/\*/, @recomp;
>
> where @recomp = qw( stuff/stuff.c
> crap/*
> morestuff/*
> stuffy/stuff_stuff.c
>
I think Helen is trying what I once did...
I wrote a script that setup a cgi web area using a template cgi script.
The script changed the variable settings directly in the script.
If I knew then what I know now.. I would have setup a file that contained
these variable values and never touch the
Helen Dynah wrote:
>
> HI,
Hello,
> I have a perl script and I am trying to write another
> perl script which will open my first perl script, change
> the values of some variables, and run the script with
> these new variables.
perldoc -f use
perldoc -f require
perldoc -f do
perldoc -q "How ca
"Kristin A. I." wrote:
>
> I am trying to indent a scroll-thru menu which has been made
> into a tree using the following database query:
> select dept_id, LPAD(' ',2*(Level-1))||dept_name dept_name
> from depts
> start with dept_id = 1
> connect by dept_parent = PRIOR dept_id;
> My probl
On Tuesday, April 9, 2002, at 12:29 PM, bob ackerman wrote:
>
> On Tuesday, April 9, 2002, at 11:06 AM, Helen Dynah wrote:
>
>>
>> HI,
>>
>> I have a perl script and I am trying to write another perl script which
>> will open my first perl script, change the values of some variables, and
>>
On Tuesday, April 9, 2002, at 11:06 AM, Helen Dynah wrote:
>
> HI,
>
> I have a perl script and I am trying to write another perl script which
> will open my first perl script, change the values of some variables, and
> run the script with these new variables. Does anyone know if this is
>
is there a way to write this without using map AND grep AND without making
it longer than it is?
@must = map { m/(.*)\/\*/; $1 } grep m/\/\*/, @recomp;
where @recomp = qw( stuff/stuff.c
crap/*
morestuff/*
stuffy/stuff_stuff.c
stuffy
On Apr 9, Gary Hawkins said:
>I was thinking there might be an instance where 'package bar' is
>essential, or the best way to go.
Perhaps you're missing the point. The package directive allows you to
change namespaces. Your Perl program operates in package 'main'. Most
modules operate in thei
Does anyone know of an inexpensive way to turn a perl script
(under windows/msdos) to an .exe file? I am aware of
perl2exe but I think there may be better and less expensive
methods.
Thanks,
Joe
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
From: "Gary Hawkins" <[EMAIL PROTECTED]>
> > > How many "things" can packages be? Is this foo a file?
> >
> > No this "foo" doesn't have to be a file. You can "have" several
> > packages in one file and "switch" between them.
> >
> > I don't know how to explain what ARE packages though.
> > Try
HI,
I have a perl script and I am trying to write another perl script which will open my
first perl script, change the values of some variables, and run the script with these
new variables. Does anyone know if this is possible and if so how I would do this.
Thanks everyone.
Helen
---
On Tuesday, April 9, 2002, at 10:19 AM, Schroeter, Richard wrote:
> Greetings,
> I am having a problem with Perl providing me the correct date when I
> subtract 86400 from the date. This is only happening when I set the
> computer's system's date to today's date. If I set the system's date to
> I'm having troubles getting a what seems to be a simple item to work
> right.. Basically, I'm trying to search through a data structure and if
> a hash value is eq a test value it has to add the test value to a hash
> in a different branch of the data structure using the same key. The
> data s
> > How many "things" can packages be? Is this foo a file?
>
> No this "foo" doesn't have to be a file. You can "have" several
> packages in one file and "switch" between them.
>
> I don't know how to explain what ARE packages though.
> Try if
> perldoc perlmod
> makes sense to you.
After
Hi,
I'm having troubles getting a what seems to be a simple item to work
right.. Basically, I'm trying to search through a data structure and if
a hash value is eq a test value it has to add the test value to a hash
in a different branch of the data structure using the same key. The
data struct
Greetings,
I am having a problem with Perl providing me the correct date when I
subtract 86400 from the date. This is only happening when I set the
computer's system's date to today's date. If I set the system's date to
tomorrows date or yesterday's date it works fine. My code is:
$TIME = time
> -Original Message-
> From: Ahmed Moustafa [mailto:[EMAIL PROTECTED]]
> Subject: regular expression to get a file extension
>
> I had the following regular expression to get the extension
> from a file
> name:
>
>
> $extension = $filename;
> $extension =~ s/(^.+\.)([^\.]+)$/$2/;
>
>
I suppose it does look a little bizarre. Actually, my goal is a little
more complex. We have a simulation that outputs data files, but often up
to 90% of the data is redundant. So I'm trying to write a filter for the
data. I have to:
1. open and load the file
2. strip all comments (marked
On Tuesday, April 9, 2002, at 09:39 AM, Kristin A. I. wrote:
> I am trying to indent a scroll-thru menu which has been made into a tree
> using the following database query:
> select dept_id, LPAD(' ',2*(Level-1))||dept_name dept_name
> from depts
> start with dept_id = 1
> connect by
I'm sure that this can be done is less steps, but it works...
#!/usr/bin/perl -w
use strict;
my $line = " stuff\n";
print chgSpace($line);
sub chgSpace {
my $line = shift;
my ( $spaces ) = $line =~ /^(\s+)/;
$spaces =~ s/ /_/g;
$line =~ s/^\s+/$spaces/;
return $line;
}
I am trying to indent a scroll-thru menu which has been made into a tree using the
following database query:
select dept_id, LPAD(' ',2*(Level-1))||dept_name dept_name
from depts
start with dept_id = 1
connect by dept_parent = PRIOR dept_id;
My problem is that the query uses spaces to ind
Check out the Net::Ping module. You can find it on PPM.
#
use Net::Ping;
$p = Net::Ping->new('icmp',2);
foreach(@computers){
if($p->ping($_){
print "$_ is there.\n";
}else{
print "$_ could not be contacted.\n";
}
}
hi,
I am new to perl
and looking to ping an oracle database located on an unix machine from win
NT
Has anyone have any idea how this can be accomplished
thanks
junaid
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Apr 9, Babichev Dmitry said:
>How can I get time (time period) in milliseconds?
Download the Time::HiRes module from CPAN; go to http://search.cpan.org/.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ htt
From: "Gary Hawkins" <[EMAIL PROTECTED]>
> > #!perl -w
> > my $x = 'Ahoj';
> > print "$x\n";
> > package foo;
> > print "$x\n";
> > __END__
> >
> > I believe packages are completely irrelevant to lexical (declared
> > with my()) variables.
> >
>
> I was following it up un
Andrew,
You could use 'sleep' to delay the program for a few seconds, but I'm not sure that's
what you want. You want one page to be displayed, then wait a few seconds, then show
another page? Try a simple HTML re-direct instead:
Stick that in above your tag. All you have to do then is mak
on Tue, 09 Apr 2002 08:26:01 GMT, Connie Chan wrote:
> I have this statement
> if ( $ENV{REQUEST_METHOD} eq "GET")
> {
> ...
> ...
> }
>
> That works fine if I don't use -w , but if I use -w,
> it tells "Use of uninitialized value in string eq at."
It doesn't work fine without '-
Jaimee,
You should also change:
chop(my$input_answer = );
to read as:
chomp(my$input_answer = );
'chomp' removes a linebreak,if there is one, from the end of the input,
which is what you want here.
'chop' removes the last character (regardless of what it is) from the end of
the input, whic
> I have this statement
> if ( $ENV{REQUEST_METHOD} eq "GET")
> {
> ...
> ...
> }
>
> That works fine if I don't use -w , but if I use -w,
> it tells "Use of uninitialized value in string eq at."
> why?
Enviroment variables come via the shell (or CGI server), and
you can't trust t
Hello, beginners.
Sorry to trouble you.
How can I get time (time period) in milliseconds?
Thank you in advance.
--
Babichev L. Dmitry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I think you need both DBI and DBD::ODBC.
Timothy Johnson <[EMAIL PROTECTED]> wrote in message
C0FD5BECE2F0C84EAA97D7300A500D5002581294@SMILEY">news:C0FD5BECE2F0C84EAA97D7300A500D5002581294@SMILEY...
>
> Oops. I think that was DBD, not DBI.
>
> -Original Message-
> From: Timothy Johnson [
Dear all,
I have this statement
if ( $ENV{REQUEST_METHOD} eq "GET")
{
...
...
}
That works fine if I don't use -w , but if I use -w,
it tells "Use of uninitialized value in string eq at."
why ? Is that related to declare it first such as :
my $req = $ENV{REQUEST_METHOD};
Thanks
> > > If you declare a variable with my() its scope will be from the
> > > declaration to the end of the enclosing block. Which for variables
> > > declared outside any {} block or eval"" means ... to the end of the
> > > file.
> > >
> >
> > Wrong.
> >
> > You forgot about 'package'.
>
> What do y
96 matches
Mail list logo