Rob,
use strict; shouldn't really affect the syntax of any DBI handle or statement. I would
help if you included an example for us to have look at here.
-Original Message-
From: Rob Roudebush[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Mon Apr 29 18:15:23 PDT 2002
Subject: Using strict
Greetings;
Yeah. The vim editor does paren/bracket matching and some
other things that you might not expect. Not exactly an IDE
and it isn't idiot proof. But you know what they say about
things that are idiot proof!
And did I mention that vim is available for nearly every
platform in use today?
Ok i'm having problems getting information from the radio button once it is
selected.
this is the part that prints out the radio button
$dbh = DBI-connect($database, $username, $passwd) || die Error connecting
.. $dbh-errstr;
$sth = $dbh-prepare(SHOW TABLES) || die 3: . $dbh-errstr;
-Original Message-
From: Greg D. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 12:42 PM
To: [EMAIL PROTECTED]
Subject: radio buttons
Ok i'm having problems getting information from the radio
button once it is
selected.
this is the part that prints out the
Rob Roudebush [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I've seemed to have narrowed down the problem to $sth variable, I guess I
can't declare this as a private variable because it prepares it and needs
to have it at least local or global to access it?
Hello Peter,
I did this on Cygwin. I followed the same steps as mentioned by you. But
still file got deleted.
sharan@SHARAN ~
$ cat foo
cat: foo: No such file or directory
sharan@SHARAN ~
$ echo foo foo
sharan@SHARAN ~
$ chmod 400 foo
sharan@SHARAN ~
$ ll foo
-r--r--r--1 sharan None
-Original Message-
From: Imtiaz ahmad [mailto:[EMAIL PROTECTED]]
And I want to sort @array_1 by szname which is the second column.
How do I do it so that it includes all the column when sorting.
What I have done
-Original Message-
From: Jackson, Harry
Sent: 30 April 2002 09:14
To: [EMAIL PROTECTED]
Subject: RE: Sorting
-Original Message-
From: Imtiaz ahmad [mailto:[EMAIL PROTECTED]]
And I want to sort @array_1
Dear All,
I am going to ask an old question about how to generate a pending page for my cgi
script.
Here is my current situation. I have got a time consuming query to the database.
After prepare the data, I should post those data on to a html page. But the problem is
the accessing
-Original Message-
From: Alex Cheung Tin Ka [mailto:[EMAIL PROTECTED]]
Dear All,
I am going to ask an old question about how to generate a
pending page for my cgi script.
Here is my current situation. I have got a time consuming
query to the database. After prepare the
Hi All - some interesting help - thanks drieux, chas, tim - all good
pointers to resolve.
I still cannot get the array naming to print - let me simplify
$h=0;
$TRY$h=3;
print $TRY$h;
does not work - I have tried ${TRY\$h} also
any ideas ??? what am I missing ??
Thanks
-Original Message-
From: [EMAIL PROTECTED]
Hi All - some interesting help - thanks drieux, chas, tim - all good
pointers to resolve.
I still cannot get the array naming to print - let me simplify
$h=0;
$TRY$h=3;
print $TRY$h;
does not work - I have tried ${TRY\$h} also
any
Here is my current situation. I have got a time consuming
query to the database. After prepare the data, I should
post those data on to a html page. But the problem is the
accessing time is too long and the browser is going to be
time out.
Hi,
Why not explore the tangent solutions... what
On Tuesday 30 April 2002 10:02 am, Alex Cheung Tin Ka wrote:
Dear All,
I am going to ask an old question about how to generate a pending page
for my cgi script. Here is my current situation. I have got a time
consuming query to the database. After prepare the data, I should post
those
Thats it Thanks Harry understand now..
Jackson, Harry [EMAIL PROTECTED] on 04/30/2002 11:07:39 AM
To: [EMAIL PROTECTED]
cc:
Subject: RE: array numerical name...
-Original Message-
From: [EMAIL PROTECTED]
Hi All - some interesting help - thanks drieux, chas, tim -
Hey Bryan,
My MUA believes you used Lotus Notes Release 5.0.5 September 22, 2000
to write the following on Thursday, April 25, 2002 at 1:41:05 PM.
BRH This is the beginners list, right?
Yep
BRH I heard that you could find code for almost anything at CPAN. How do you
BRH go about this?
Go
I am looking at putting together a class for my kids school on perl. I am
looking for suggestions, course books, homework examples, etc.
Thanks;
Ernest P. Tucker II
Network Technician
The information transmitted is intended only for the person or entity to
which it is addressed and
Hi folks!
1st of all: Thanks to Ron Michael for giving me ideas and helping me out!!
Here is the code resulting from my excercise. May be useful for others, who
knows!! I'll be using it anyway, since I'm planning on kicking off my own
Linux Distro. Will be using it for figuring out
I am looking at putting together a class for my kids school on
perl. I am looking for suggestions, course books, homework
examples, etc.
Have a look at the Beginner's Introduction to Perl by Doug Shepard
at perl.com. The link for the first part is
Great advice! Any more ideas (NT specific)? As I've stated before, I'm learning this
on NT and my reason for learning Perl was to play around on NT and get a better idea
of how it works. I've gotten the Roth NT Admin with Perl book and I'm browsing this
(I can't wait until I'm savvy enough to
on Tue, 30 Apr 2002 12:17:21 GMT, [EMAIL PROTECTED] (Anthony
Beaman) wrote:
Great advice! Any more ideas (NT specific)? As I've stated before,
I'm learning this on NT and my reason for learning Perl was to
play around on NT and get a better idea of how it works.
Perl for System
Hey John,
My MUA believes you used Internet Mail Service (5.5.2655.55)
to write the following on Tuesday, April 30, 2002 at 9:32:33 AM.
JE How can I resolve a machine name from an IP address? The machine
JE that the script is running on is NT4.
JE I've tried this (with use Socket qw(:DEFAULT
On Apr 30, David Gray said:
Hi all - should be simple - but I cannot figure it out
basically i want to name an array with a subscript ie
world0[0] and world1[0] the 0/1 being a variable, i have tried to
produce a simple example
For any help - thanks..
On Tuesday, April 30, 2002, at 06:32 , John Edwards wrote:
[..]
$machine_name = gethostbyaddr(inet_aton($userIP), AF_INET) or die Can't
resolve $userIP: $!\n
It works on the LAN, but not across a router to the remainder of our WAN.
Any ideas?
My complements to Tim Musson [EMAIL PROTECTED]
On Tuesday, April 30, 2002, at 03:51 AM, [EMAIL PROTECTED]
wrote:
Thats it Thanks Harry understand now..
for completion's sake:
you were asking how to create a variable name programmatically and use it.
$h='0';
$TRY = 'world';
$tryvar = $try.$h; # we have created a new variable
On Tuesday, April 30, 2002, at 03:07 , Jackson, Harry wrote:
[..]
$TRY = world;
$h = 0;
$TRY{$h}=3;
print $TRY . $h . $TRY{$h}\n;
of course in 'use strict' it will whine that it does not want
to allow you
my $TRY{$h} = 3;
and would prefer that you pre-declare
my %TRY;
-Original Message-
From: drieux [mailto:[EMAIL PROTECTED]]
On Tuesday, April 30, 2002, at 03:07 , Jackson, Harry wrote:
[..]
$TRY = world;
$h = 0;
$TRY{$h}=3;
print $TRY . $h . $TRY{$h}\n;
of course in 'use strict' it will whine that it does not want
to allow you
my
On Tuesday, April 30, 2002, at 07:32 , David Gray wrote:
[..]
my $fred = 'one,two,three,four';
my $a = 0;
@{array$a} = split ',', $fred;
for(0..3) {
print ${array$a}[$b]
}
File untitled text 2; Line 21: Name main::b used only once: possible
typo
File untitled text 2; Line 18: Can't
While I agree with the premise of this article, I've objected in the past to
sending people there to learn about the pitfalls of the so-called
dynamically named variables. In general, if you want to convince someone
of something, you don't tell them that they're stupid for wanting to do it.
On Monday, April 29, 2002, at 10:13 , sharan wrote:
[..]
first off note that chmod 400 did not take you where you expected.
sharan@SHARAN ~
$ ll foo
-r--r--r--1 sharan None4 Apr 30 10:39 foo
ls -l foo
-rw-r--r-- 1 drieux wheel 4 Apr 30 09:54 foo
[jeeves:/tmp/drieux]
On Apr 30, Jackson, Harry said:
Is the following more suitable or is it bollocks as well.
my $TRY = world;
my $h = 0;
my %TRY;
$TRY{$h}=3;
print $TRY . $h . $TRY{$h}\n;
Well, except for the fact that $TRY and $TRY{$h} have nothing to do with
each other... that is perfectly fine. You might
Does anybody know what the .mst files are on AIX system?
Is there a PERL modules to read them?
Thankx
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello all,
Quick question on building a new version of Perl. I have a Solaris 2.6 box
that has Perl 5.005_3 on it and want to install a new version of perl. My
version of gcc has been upgraded to 3.0.3. Perl quits during the
configuration when it can't compile a simple C program that
On 04/30, sharan said something like:
Hello Peter,
I did this on Cygwin. I followed the same steps as mentioned by you. But
still file got deleted.
sharan@SHARAN ~
$ cat foo
cat: foo: No such file or directory
So far so good.
sharan@SHARAN ~
$ echo foo foo
sharan@SHARAN ~
$
Hi Guys,
I am wondering which module and documentations I should look for if I
need to allow users of this GUI program to browse their directory and
pick a file.
Thanks
Eric
On Tuesday, April 30, 2002, at 09:18 , Jackson, Harry wrote:
Is the following more suitable or is it bollocks as well.
keeping timothy's kind and gentle rebuke in mind.
{ my complements timothy!!! }
There are two sets of competing concerns:
a) get the code to work
b)
On Tuesday, April 30, 2002, at 07:32 , David Gray wrote:
[..]
my $fred = 'one,two,three,four';
my $a = 0;
@{array$a} = split ',', $fred;
for(0..3) {
print ${array$a}[$b]
}
File untitled text 2; Line 21: Name main::b used only
once: possible
typo
File untitled text 2;
When executing a child script from a parent script using the system command,
is there a way to allow the child script to recognize the variables declared
by the parent script?
In other words, can you replicate the export functionality of a UNIX shell
script using PERL?
Thanks
--
To
On Tue, 30 Apr 2002 12:47:11 -0500 Rob [EMAIL PROTECTED] wrote:
When executing a child script from a parent script using the system command,
is there a way to allow the child script to recognize the variables declared
by the parent script?
In other words, can you replicate the export
what does your system command look like?
Are you running this on UNIX? if so, why not use fork?
you might be interested in reading the:
perldoc perlipc
There is usually a chapter in every perl book on IPC. Some are better than
others.
what kind of varibles do you want to pass? (how
Perhaps you should use a template file that contains what varibles are
initialized to.
I have run into this situation many times, and a file that contains some
values to default to is better than anything else... so you would feed your
command
myscript.pl c:/path/to/template.file
better to
-Original Message-
From: Rob [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 1:47 PM
To: [EMAIL PROTECTED]
Subject: Pass variables from parent to child script
When executing a child script from a parent script using the
system command,
is there a way to allow the
Hi
I am a student an I'm new to Perl. For a university assignment I need to read the
contents of a text file in an array. I am using Windows. The code I am writing is:
$file = /test.txt;
open (INFO, $file);
lines = INFO;
close(INFO);
Altough this is supposed to work, I am getting a
I am a student an I'm new to Perl. For a university
assignment I need to read the contents of a text file in an
array. I am using Windows. The code I am writing is:
$file = /test.txt;
open (INFO, $file);
Always check to make sure your filehandle was actually opened:
open (INFO, $file)
More than likely
1.) the file doesn't exist
2.) you don't have read permissions
You might have meant ./test.txt which will read the file from your current
directory instead of the root directory.
- Original Message -
From: Josef E. Galea [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Thanks for your reply Dave.
Now I am getting 'No such file or directory' when i am sure that the file
exists
I changed line 1 to:
$file = D:/test.txt;
The problem is that the file is there for sure! Sorry to bother you again!
- Original Message -
From: David Gray [EMAIL PROTECTED]
To:
I am using Windows.
$file = 'D:\\test.txt';
should help out
as will the good advice about checking to see if the open succeeds
Josef E. Galea [EMAIL PROTECTED] wrote in message
002201c1f07d$15712780$b9669ec3@josvio">news:002201c1f07d$15712780$b9669ec3@josvio...
Hi
I am a student an I'm new to
Are you absolutely sure that the file is in the root directory of your D
drive? Most Windows machines are setup with C as the primary drive. Do
you have two hard drives, or a hard drive with two partitions?
At 09:37 PM 4/30/2002 +0200, Josef E. Galea wrote:
Thanks for your reply Dave.
Now I
Hey Josef,
My MUA believes you used Microsoft Outlook Express 5.50.4133.2400
to write the following on Tuesday, April 30, 2002 at 3:37:35 PM.
JEG Thanks for your reply Dave. Now I am getting 'No such file or
JEG directory' when i am sure that the file exists
JEG I changed line 1 to:
JEG $file =
Hey )))
I am learning perl now for use with CGI.
I installed active Perl on both windows Millenium AND windows XP systems.
Both of the fail to run a .pl file. I see a window flash on the screen for
a part of a second and then disappear.the window looks like it is a DOS
command window.
Hi,
I need little help
I wrote these lines which basically pings a server one time and if ping goes
fine, nothing is done
But if pings fails it sends email
What I want is that it should ping three times in a row when the ping fails
and then sends email
It should not send email if it fails to ping
try opening a command prompt in the directory with the perlscript and type
in the name of the perl script:
c:\scripts test.pl
-Original Message-
From: Larry [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 6:01 PM
To: [EMAIL PROTECTED]
Subject: Brand New Perl Beginner -
Ok guys, thank you all for your suggestions. I solved the problem. It consisted of a
bug with the text editor that saved the file as test.txt.txt. Rather lame actually.
Thank you all
Josef
Try running the script from a command promt window (Start Run cmd.exe)
using
perl scriptname.pl
so that if there is an output, you see it. Also try to use
perl -w scriptname.pl to locate possible bugs
- Original Message -
From: Larry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
What up people?
I find myself debugging this giant script (yes I have already split it down
to modules and this is as small as it gets), but I would like to be able to
import debug commands from a file (to set some basic breakpoints and at
commands), because I don't like to constantly type them
I am learning perl now for use with CGI.
I installed active Perl on both windows Millenium AND windows
XP systems.
Both of the fail to run a .pl file. I see a window flash on
the screen for a part of a second and then disappear.the
window looks like it is a DOS command window.
I also find that it's only more confusing to be sesquipedalian in response
to posts that only
need a simple, clear answer.
Sesquipedalian is a pretty big word. :)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Tue, 2002-04-30 at 16:45, Timothy Johnson wrote:
I also find that it's only more confusing to be sesquipedalian in response
to posts that only
need a simple, clear answer.
Sesquipedalian is a pretty big word. :)
Come on now, we need to eschew obfuscation.
--
Today is Setting
RE: Help PleaseYep it reads each line in an array location i.e. in array location 0 it
reads the first line, in array location 1 the second line etc...
The complete code is:
$file = your text file name;
open (FILE, $file);
@contents = FILE;
close (FILE);
This is all the code, feel free to use
John,
Could you please comment/explain the following lines please?
my @sorted = map { (split/\0/)[1] }
sort
map { @{[(split)[1,0,2]]}\0$_ }
@array;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
This code will read the entire file into the array. This works fine for
SMALL files. When you get into large files, the program will take up more
RAM than the file takes on disk.
You also probably won't eliminate your loops. They may no longer be while
loops, but you will likely still need to
Around Tue,Apr 30 2002, at 09:37, Josef E. Galea, wrote:
Thanks for your reply Dave.
Now I am getting 'No such file or directory' when i am sure that the file
exists
I changed line 1 to:
$file = D:/test.txt;
try
$file=D:\\test.txt;
--
Roger
From: Josef E. Galea[SMTP:[EMAIL PROTECTED]]
To: [EMAIL PROTECTED]
Hi
I am a student an I'm new to Perl. For a university assignment I need
to
read the contents of a text file in an array. I am using Windows. The
code I am writing is:
$file = /test.txt;
open (INFO,
From: Larry[SMTP:[EMAIL PROTECTED]]
Hey )))
I am learning perl now for use with CGI.
I installed active Perl on both windows Millenium AND windows XP
systems.
Both of the fail to run a .pl file. I see a window flash on the
screen for a part of a second and then
From: Najamuddin, Junaid[SMTP:[EMAIL PROTECTED]]
It is not ideal but will count each fail and if it reaches three it
will execute whatever you want. I think you can change ping to only
ping so many times. Hope it helps.
#!PERL
use strict;
use warnings;
my $count = 0;
my $line;
my
John,
Could you please comment/explain the following lines please?
my @sorted = map { (split/\0/)[1] }
sort
map { @{[(split)[1,0,2]]}\0$_ }
@array;
It's fun trying to figure out what the heck John's code does :)
Split each element of @array on
On Apr 30, Harry Jackson said:
#!perl
#
# These are a must of course.
use strict;
use warnings;
# Note I am trying to avoid flames
# by including all the usaul
# warnings stricts etc
#
my $CurrentLine;
#
# Please enter your own pathname
#
open (INFILE, c:\\hello.txt) || die Unable to open
From: Timothy Johnson[SMTP:[EMAIL PROTECTED]]
I also find that it's only more confusing to be sesquipedalian in
response
to posts that only
need a simple, clear answer.
Sesquipedalian is a pretty big word. :)
There is a lot of information on the net and I try to read the
On Tue, 30 Apr 2002, Larry wrote:
Anyway, I do not see the program run. Of course I am doing something very
basic wronganyone know what it is??? Thanks !!!
What program is it? You likely won't see it do much in the GUI in the normal
course of things, as Perl will usually do things to
Jeffrey Seger [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
if ( $tablename 1) is going to evaluate to false since the numeric value
of any string is 1.
Actually, its a little more complicated than this.
A string that starts with non-numeric alphanumeric
Hello all,
Solaris, Oracle 8.1.6, Perl 5
How do I write my selected row from Oracle out to a new file? Below is what
I have so far. I can select the row, but I don't know how to write it to a
new file:
#!/usr/local/bin/perl -w
#
# REMEMBER! Set the environment variable:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dear all,
I'm trying to install mod_perl (and, ultimately, embperl) following
instructions at
http://take23.org/intro/index.xml/3. I've upgraded my perl dist to
v5.6.1 fo i686-linux. Apache's (1.3.20) already running, tweaked for
php, which in
I got this problem from a friend and was wondering if anyone could help
out.
The following is a set of functional dependency for a relation R
(A,B,C,D,E,F) with A-D, BE-CDF, C-E, D-B
where A-D implies A determines D or D is functionally dependent on A.
Questions:
1. Show with explanation
The first one is easy enough. When we trace the dependencies of F we see
that F depends on B and E, so we get something like this:
A-D-B-F
C-E-F
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 3:23 PM
To: [EMAIL PROTECTED]
Thanks for the help!! I think it's almost there. This is what my script look
like now:
use strict;
use DBI;
open(TEXTFILE,output.txt);
my $dbh = DBI-connect( 'dbi:Oracle:db',
'user',
'passwd',
{
On Tuesday, April 30, 2002, at 11:34 , David Gray wrote:
[..]
given the quandery:
basically i want to name an array with a subscript ie
world0[0] and world1[0] the 0/1 being a variable, i have tried to
produce a simple example
why take the convolutions???
Howdy:
I'm looking for examples of how to use element 0
in one array as a search pattern and looking in
other arrays for that pattern. Here's what I have
so far ...
[snip code]
#!/usr/bin/perl -w
use diagnostics;
# test to read two files into two arrays
# do a search for each *FIRST* element
First of all, I would just like to apologize for not sending this to the
CGI-list, but I prefer this list. As this is where I've gotten the best help
in the past. Blame yourself :)
I was reading CGI.pm when I discovered that you could use the -value
argument from submit buttons, and assign them
On Tuesday, April 30, 2002, at 01:57 , Chas Owens wrote:
On Tue, 2002-04-30 at 16:45, Timothy Johnson wrote:
I also find that it's only more confusing to be sesquipedalian in
response to posts that only need a simple, clear answer.
Sesquipedalian is a pretty big word. :)
Come on now,
On Tuesday, April 30, 2002, at 04:17 PM, Tor Hildrum wrote:
First of all, I would just like to apologize for not sending this to the
CGI-list, but I prefer this list. As this is where I've gotten the best
help
in the past. Blame yourself :)
I was reading CGI.pm when I discovered that
On Tuesday, April 30, 2002, at 04:07 PM, Johnson, Shaunn wrote:
Howdy:
I'm looking for examples of how to use element 0
in one array as a search pattern and looking in
other arrays for that pattern. Here's what I have
so far ...
[snip code]
#!/usr/bin/perl -w
use diagnostics;
#
On Tuesday, April 30, 2002, at 04:07 , Johnson, Shaunn wrote:
$file=command.txt;
$file2=command2.txt;
@array=file;
@array2=file2;
wouldn't it be nice if
open(file, $file ) or die unable to open file $file:$!\n;
open(file2, $file2 ) or die unable to open file $file2:$!\n;
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Howdy,
Thanks to Matt for pointing me in the right direction re: mod_perl.
Here's my latest: working through the perl tutorial docs at
http://www.devshed.com/Server_Side/Perl/Perl101/Perl101_2/page3.html
I've created the code that follows;
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On the heels of my last note, I'm thinking a tutorial that doesn't
teach automatic use of -w and use strict is a Bad Thing. So I'm
looking at http://www.perl.com/cs/user/query/q/6?id_topic=74 where
there is a wealth of tutorials and such. Can
On Tuesday, April 30, 2002, at 05:27 , Robert Beau Link wrote:
[..]
#!/usr/bin/perl -w
use strict;
print Number, please...;
$alpha = STDIN;
print Another, please...;
$beta = STDIN;
$sum= $alpha + $beta;
$diff = $alpha - $beta;
$product = $alpha * $beta;
$quotient = $alpha / $beta;
Hello beginners,
I have a small perl script which checks to see if input is a
hostname or an IP address before writing it to a file.
I was just checking to see if the first char was a number or a digit
but there are some cases where a hostname can start with a number.
(like
Hello David,
Tuesday, April 30, 2002, 7:51:29 PM, you wrote:
DU I was just checking to see if the first char was a number or a digit
DU but there are some cases where a hostname can start with a number.
DU (like 3.14159.com for example)
Sorry to reply to my own post, but a friend just
On Tuesday, April 30, 2002, at 05:51 , David Ulevitch wrote:
[..]
I was just checking to see if the first char was a number or a digit
but there are some cases where a hostname can start with a number.
(like 3.14159.com for example)
So the question is, if I have a variable like
88 matches
Mail list logo