On Tue, 26 Oct 2004, Adamiec, Larry wrote:
This link may be of help to some people.
http://www.samag.com/documents/s=9408/ur0411l/
I bet it would go over even better on the CGI list :-)
--
Chris Devers
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Roime bin Puniran [EMAIL PROTECTED] wrote:
: I have a script that read some text file in the directory. All
: the data inside the text file then would be extracted into my
: sql, and i used foreach loop to read the text file, then doing
: some loop while data are sorted. Here is my code.
hi Chris,
Thanks for the responses.
Q1: Your suggestion would work without the date module for now :-)
Q2: The input file is a flat file (.txt) parsed by ~ with 40 columns.
Columns 2-40 has numbers (all integers, +ve and -ve numbers). Column 0 has
items in alphanumeric and column 1 has labels in
deny wrote:
Try to add this lines somewhere the top of the file:
use strict;
use warnings;
and report the errors, if any.
Global symbol $md5 requires explicit package name at ./checksum.pl
line 11.
Global symbol @dirs requires explicit package name at ./checksum.pl
line 12.
Global symbol $dir
Why does this don´t work in my Script?
open (TEST, /tmp/test.txt);
while (TEST) {
print $_;
# or just
print;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Bastian Angerstein wrote:
Why does this dont work in my Script?
open (TEST, /tmp/test.txt);
while (TEST) {
print $_;
# or just
print;
}
Does the file exists and can you read it?
--
Flemming Greve SkovengaardThe killer's breed or the Demon's seed,
a.k.a Greven, TuxPower
Joop,
if I use open... or die $! i see that the file is opened correctly but nothing is in
$_.
-Ursprngliche Nachricht-
Von: Flemming Greve Skovengaard [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 26. Oktober 2004 11:45
An: [EMAIL PROTECTED]
Cc: Bastian Angerstein
Betreff: Re:
Bastian Angerstein wrote:
Joop,
if I use open... or die $! i see that the file is opened correctly but nothing is in
$_.
-Ursprngliche Nachricht-
Von: Flemming Greve Skovengaard [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 26. Oktober 2004 11:45
An: [EMAIL PROTECTED]
Cc: Bastian
Bastian Angerstein wrote:
I noticed that while ($test=TEST) works on my system perfectly but while (TEST) dont
... dont know why...
should reinstall perl.
Thanks for your help
Bastian
They should both work, why they don't is beyond me.
Please post on the list, I am *not* a all-seeing, all-knowing
Ron Smith wrote:
The sulution that you and others gave to the previous problem worked
out fine. I thought I sent mail regarding that.
You may have done that; sorry if I was mistaken.
I didn't think that this was related to that problem; but, it is very
similar.
What I mean is that I believe it
M. Ilyas Hassan wrote:
hi,
Could someone please help me with the following perl questions.
#1 - Is there a way to add days to a date? I want
end_date=start_date+90days; where start_date is in the format
10/25/04; the output end_date should be in the same format as well. I
was not
Scott Pham wrote:
I've been thinking about this and not sure how to approach this
problem. Say I want to create an array of 4 array references, thats
easy since I know that there will be 4 array references, how would I
do this dynamically? Say if one I only needed 2 references and
another I
On Tue, 26 Oct 2004 11:33:24 +0200, Bastian Angerstein
[EMAIL PROTECTED] wrote:
Why does this don´t work in my Script?
open (TEST, /tmp/test.txt);
while (TEST) {
print $_;
# or just
print;
}
You are making the assumption that 'TEST' sets '$_' which is not
true. Oddly, perl makes
David le Blanc wrote:
...
You are making the assumption that 'TEST' sets '$_' which is not
true. Oddly, perl makes '' set $_, but not FILE... dunno why
Sorry, but that's just not correct.
while (TEST)
DOES set $_, as documented in perldoc perlop under the secion I/O
Operators
The OP has
Jenda
P.S.: What the heck is find.pl? You should be using File::Find!
thanks for your help
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
- Original Message -
From: mkondelk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 25, 2004 6:39 AM
Subject: Interactive socket client
I have this interactice client:
#!/usr/bin/perl -w
use strict;
use IO::Socket;
my ($host, $port, $kidpid, $handle, $line);
unless
M. Ilyas Hassan [EMAIL PROTECTED] wrote:
: The input file is a flat file (.txt) parsed by ~ with 40
: columns. Columns 2-40 has numbers (all integers, +ve and -ve
: numbers). Column 0 has items in alphanumeric and column 1 has
: labels in text. I would like to find the minimum value for
: numbers
Roime bin Puniran, wrote:
#Prepare the insert SQL
my $rec = $dbh-prepare(INSERT INTO t_flows(ipSrc, ipDst, pktSent,
bytesSent, startTime, endTime, srcPort,
dstPort, tcpFlags, proto, tos) VALUES ('$value1', '$value2',
'$value3', '$value4', '$value5', '$value6',
'$value7', '$value8',
On Tue, 26 Oct 2004, Murphy, Ged (Bolton) wrote:
Going back a few years here, but does an SQL statement not have to end
in a semi-colon as above?
I think it depends on your SQL interpreter.
The MySQL command line interface `mysql` expect semi-colons, as does the
`psql` tool for
Hello everyone,
First, this is a basic problem, but I have looked at it for over an
hour and wasted time. Now, I'm asking for help.
For some reason nothing is being printed to the MY filehandle. Can
someone see what I'm doing wrong?
#!/usr/bin/perl
Chris Devers wrote:
On Tue, 26 Oct 2004, Murphy, Ged (Bolton) wrote:
Going back a few years here, but does an SQL statement not have to
end in a semi-colon as above?
I think it depends on your SQL interpreter.
The MySQL command line interface `mysql` expect semi-colons, as does
the
Kevin Old wrote:
Hello everyone,
First, this is a basic problem, but I have looked at it for over an
hour and wasted time. Now, I'm asking for help.
For some reason nothing is being printed to the MY filehandle. Can
someone see what I'm doing wrong?
Is
if ( $_ =~
On Tue, 26 Oct 2004, Bob Showalter wrote:
Chris Devers wrote:
On Tue, 26 Oct 2004, Murphy, Ged (Bolton) wrote:
Going back a few years here, but does an SQL statement not have to
end in a semi-colon as above?
I think it depends on your SQL interpreter.
The MySQL command line
Put the MY in braces.
SO
print MY $line;
WOULD BECOME
print {MY} $line;
--- Kevin Old [EMAIL PROTECTED] wrote:
Hello everyone,
First, this is a basic problem, but I have looked at it for over an
hour and wasted time. Now, I'm asking for help.
For some reason nothing is being printed
I want to restore the default admin shares on a user's machine.
I have to delete the following key from the registry.
To restore the default hidden administrative shares, delete the
AutoShareWks
DWORD value in the following registry key, and then restart your
computer:
Kevin Old wrote:
First, this is a basic problem, but I have looked at it for over an
hour and wasted time. Now, I'm asking for help.
Just an hour, and you think it's already justified to waste hundreds
of other person's time?
I disagree. You need to be a lot more patient if you want to learn
On Tue, 26 Oct 2004 10:57:39 -0500, JupiterHost.Net
[EMAIL PROTECTED] wrote:
Kevin Old wrote:
Hello everyone,
First, this is a basic problem, but I have looked at it for over an
hour and wasted time. Now, I'm asking for help.
For some reason nothing is being printed to the MY
Brian Gunlogson wrote:
Put the MY in braces.
SO
print MY $line;
WOULD BECOME
print {MY} $line;
Why? That fails under use strict, and is totally unecessary.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Tue, 26 Oct 2004 19:17:11 +0200, Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote:
Kevin Old wrote:
First, this is a basic problem, but I have looked at it for over an
hour and wasted time. Now, I'm asking for help.
Just an hour, and you think it's already justified to waste hundreds
of
Wait a minute there. I'm not learning programming. I've been a perl
programmer for 7 years and have written hundreds of more complex
programs than this and have written to thousands of files in my time.
I just needed another pair of eyes to possibly point out what I was
doing wrong.
Also,
On Tue, 26 Oct 2004 10:57:39 -0500, JupiterHost.Net
[EMAIL PROTECTED] wrote:
Kevin Old wrote:
Hello everyone,
First, this is a basic problem, but I have looked at it for over
an
hour and wasted time. Now, I'm asking for help.
For some reason nothing is being printed to the MY
Chap Harrison wrote:
Ah-freakin'-men. Gunnar, what the *hell*? I've been reading this list
for a couple of months now and the majority of your posts seem to be
little more than chiding people in an extremely unpleasant tone.
If you find a *particular* post extremely unpleasantly worded, please
Oops, my bad. This looked like a problem I had. I stored a filehandle in a hash, and
it confused
print when I accessed the filehandle as a scalar.
I'd better think before I post again... *blush*
--- Bob Showalter [EMAIL PROTECTED] wrote:
Brian Gunlogson wrote:
Put the MY in braces.
SO
I agree, Gunnar is mean. Mean people suck!
derek
Chap Harrison [EMAIL PROTECTED]
10/26/2004 01:37 PM
To: Gunnar Hjalmarsson [EMAIL PROTECTED]
cc: Perl Lists [EMAIL PROTECTED]
Subject:Re: Printing to a file
Wait a minute there. I'm not learning
I like Gunnar, professional, to the point. He answers alot of questions too.
'The silent majority'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
[EMAIL PROTECTED] wrote:
I agree, Gunnar is mean. Mean people suck!
Ok, everyone calm down :) Perhaps some folks can be a bit blunt and
maybe its even wrong *but* the content was good if not the delivery :)
As a support person myself it is extremely annoying when soemone comes
up and says My
print Gunnar does not suffer fools gladly.\nSo?;
print Try not to look like a fool!;
- Original Message -
From: JupiterHost.Net [EMAIL PROTECTED]
To: Perl Lists [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 4:01 PM
Subject: Re: Printing to a file
[EMAIL PROTECTED] wrote:
I
This link may be of help to some people.
http://www.samag.com/documents/s=9408/ur0411l/
Larry Adamiec
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On Tue, 26 Oct 2004, Adamiec, Larry wrote:
This link may be of help to some people.
http://www.samag.com/documents/s=9408/ur0411l/
I bet it would go over even better on the CGI list :-)
--
Chris Devers
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
#!/usr/bin/perl
+
use warnings;
use strict;
use File::Find;
find sub {
return unless -f;
return unless $_ =~ /.\d+$/;
print $_\n;
#print $File::Find::name\n;
+
open(SD, $_) or die can't open $_ $!\n;
#my $fh = IO::File-new( /tmp/savedata/new/$_)
yes I do agree, some people need to try harder at their code and be more
descriptive in their problems. Gunnar, nothing personal! : )
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
JupiterHost.Net [EMAIL PROTECTED]
10/26/2004 04:01 PM
To: Perl Lists [EMAIL
Ed Christian wrote:
#!/usr/bin/perl
+
use warnings;
use strict;
use File::Find;
find sub {
return unless -f;
return unless $_ =~ /.\d+$/;
print $_\n;
#print $File::Find::name\n;
+
open(SD, $_) or die can't open $_ $!\n;
#my $fh = IO::File-new(
Hi,
Here's a snippet of some code from the cookbook.
I am trying to understand what $seen{$1} is. ie where did $1 come from,
and what is in $seen{$1}, and how is the hash populated?
thanks.
Radhika
#!/usr/bin/perl
#use strict;
#use diagnostics;
my %seen = ();
my $string
rs wrote:
Hi,
Here's a snippet of some code from the cookbook.
Hmm, time to get a new cookbook :~)
I am trying to understand what $seen{$1} is. ie where did $1 come
from, and what is in $seen{$1}, and how is the hash populated?
$1 is a built-in variable that is set by capturing parens in a
From: Adamiec, Larry [EMAIL PROTECTED]
This link may be of help to some people.
http://www.samag.com/documents/s=9408/ur0411l/
Opinions differ. I think including these HTML generation functions
in CGI.pm was a bad design decision (a module should do only one
thing) and that they are hard to
On Tue, 26 Oct 2004 16:50:11 -0400, Bob Showalter
[EMAIL PROTECTED] wrote:
rs wrote:
Hi,
Here's a snippet of some code from the cookbook.
Hmm, time to get a new cookbook :~)
Nope. Just make sure you understand the the OP changed the code
quoted from the cookbook, and that the
%seen = ( );
$string = an apple a day;
foreach $char (split //, $string) {
$seen{$char}++;
}
print unique chars are: , sort(keys %seen), \n;
Also, a couple of paragraphs later, the Cookbook goes on to show how
to solve the same problem with a while loop and a regular
Interesting.
Why doesn't this skip already seen letters, I used the
case-insensitive modifier...
%seen = ( );
$string = AaBbCcDdEeFf;
while ($string =~ /(.)/gi) {
$seen{$1}++;
}
print \n\nunique chars are: , sort(keys %seen), \n;
'A' and 'a' are the same, or is the logic only char()
Hi,
I'm trying to install Bugzilla on a Redhat 8 system. And now I came across
this problem of installing the required Template module.
I've checked all the dependency of the Template module but when I do perl
-MCPAN -e 'install', the make test will show one fail:
# perl -MCPAN -e'install
It's an exmaple of where you must decide if a 2% failure rate is
worth forcing it.
force install Template
Or, install it manually by downloading the template file off cpan.
On Tue, 26 Oct 2004 15:30:09 -0700, Clement Lau
[EMAIL PROTECTED] wrote:
Failed 1/90 test scripts, 98.89% okay. 1/2454
Simply put, the dot (.) matches everything regardless of modifier switch.
--
WC -Sx- Jones
http://youve-reached-the.endoftheinternet.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Hi,
I've actually tried grabbing the src package manually and install it but
only came out with the same result.
I'm still a bit reluctant to do the force install, thinking just maybe a
little tweak will solve the whole thing. Anymore suggestions?
Thanks,
Clement Lau
Tugboat Media Inc.
[EMAIL
On Tue, 26 Oct 2004, Clement Lau wrote:
I'm trying to install Bugzilla on a Redhat 8 system.
Okay, so isn't there an RPM you could install?
Bugzilla is popular enough that I'd be surprised if there wasn't already
a pre-made RPM package that could be used for this.
For that matter, there
On Tue, 2004-10-26 at 22:00, Chasecreek Systemhouse wrote:
Interesting.
Why doesn't this skip already seen letters, I used the
case-insensitive modifier...
%seen = ( );
$string = AaBbCcDdEeFf;
while ($string =~ /(.)/gi) {
$seen{$1}++;
}
print \n\nunique chars are: , sort(keys
Michael S. Robeson II [EMAIL PROTECTED] wrote in message ...
open(DNA_SEQ, $dna_seq)
Due to precedence, the parens are optional here.
open(OUTFILE, indel_list_.$dna_seq)
^
indel_list_$dna_seq or indel_list_.$dna_seq
foreach (keys %sequences) {
Hi
I have a binary file that I have been tasked to discover the format of and
somehow convert the records to readable text. Is there any way I can find
out what binary format the file is in, so I can create an template for
unpack() to convert the binary to text?
Thanks
Jim
---
Outgoing mail is
David == David le Blanc [EMAIL PROTECTED] writes:
David You are making the assumption that 'TEST' sets '$_' which is not
David true. Oddly, perl makes '' set $_, but not FILE... dunno why
No, that's completely wrong.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
Jenda == Jenda Krynicky [EMAIL PROTECTED] writes:
Jenda Opinions differ. I think including these HTML generation functions
Jenda in CGI.pm was a bad design decision (a module should do only one
Jenda thing) and that they are hard to read and maintain.
I'll be the one that disagrees then. I
On Tue, 26 Oct 2004, Jim wrote:
I have a binary file that I have been tasked to discover the format of
and somehow convert the records to readable text. Is there any way I
can find out what binary format the file is in, so I can create an
template for unpack() to convert the binary to
59 matches
Mail list logo