Even simpler...
opendir DIR, "/logs/test";
@dirs = readdir DIR;
closedir DIR;
foreach (@dirs) {
if ( -d "/$_") {
# do your stuff
# Notice that you need to preceed the $_ with the path you
passed to opendir.
}
}
R
At 16:47 30/09/2002 -0500, e
Bootscat wrote at Tue, 01 Oct 2002 00:10:32 +0200:
> I'm setting up a list for free and pro members.
> I want the pro members to be able to mail daily. I have this part working.
>
> I want the free members to only be able to mail every 4 Days to the list.
>
> Using the localtime(time) =
> (se
On Tuesday 01 Oct 2002 2:53 am, Hengky wrote:
> > > How is it possible to cycle through an SQL table row by row, without
> > > having to increment an ID by 1 in a while loop and go
> > > SELECT * FROM table WHERE id=$id
> > > ?
> > > And how can I find out how many rows are in the table?
>
> i hop
--
There are only 10 types of people in the world - Those who understand
binary, and those who don't
Does anyone know if it is possible to access a .mdb file (MS Access)
from perl running on a linux box? I don't have access to a windows box
to serve the files and the DBD:ODBC drivers se
on Tue, 01 Oct 2002 10:50:26 GMT, [EMAIL PROTECTED]
(Gary Stainburn) wrote:
> Nobody's mentioned:
>
> $countrow=$sth->rows;
>
> This way is more efficient that doing the 'select count(*)' as
> it's done from the same select query, and it also means that yo
> know beforehand how many rows you w
Hi,
I was wondering if someone can shed some light on a problem I am
having. I have a sub routine that forks each variable in an array one
at a time. But after the last element in the array the program exists
from the sub routine, it does not continue after the the last element
in the arra
--
There are only 10 types of people in the world - Those who understand
binary, and those who don't
Does anyone know if it is possible to access a .mdb file (MS Access)
from perl running on a linux box? I don't have access to a windows box
to serve the files and the DBD:ODBC drivers se
I need to get 2 fields out of a file which has the following format:
#FIELD
[tab]NAME=name to put into hash[newline]
[tab]DATALINE=value to put with data[newline]
[tab]EXTRA=several fields to ignore...
[NEWLINE]
#NEXTFIELD
[tab]NAME ...
I have thought of a couple ways I *could* do it, but I th
Hi all,
Given an input file that has the following records:
123ABCXX112Zz
123DEFXX113Z
123EEFXX112 Zz
444cccvvbfdc
444CCdvvbfdc
444dddssddd
On Tuesday 01 Oct 2002 12:14 pm, Felix Geerinckx wrote:
> on Tue, 01 Oct 2002 10:50:26 GMT, [EMAIL PROTECTED]
>
> (Gary Stainburn) wrote:
> > Nobody's mentioned:
> >
> > $countrow=$sth->rows;
> >
> > This way is more efficient that doing the 'select count(*)' as
> > it's done from the same select
Simple for some (most), perplexing me:
have a variable, say $Record which contains many lines (actually codes),
like:
So on
How can I roll through the value of the variable, capturing each line and
pushing it onto an array?
Kind like reading entries in a cfg file (one on each line) an
and how would you like this info stored? What portions of the info do you
want?
You need to supply us with more information as to what you want to do.
We are good... but we aren't mind readers.
This looks a bit like homework to me, so show us what you got so far and
we'll help.
> -Original Me
On Mon, 30 Sep 2002 20:07:29 -0700, [EMAIL PROTECTED]
([EMAIL PROTECTED]) wrote:
>Hi: I have both perl 5.6.1 and perl 5.6.0 on my system.
>
>What're the steps to remove them, and prepare for install of perl 5.8?
>
>When I run locate perl 5.6.0, I get a list of files. Is this the way to
>do it?
On Mon, 30 Sep 2002, Paul and Joann Van Dalen wrote:
> Hi all,
>
> Given an input file that has the following records:
>
> 123ABCXX112Zz
> 123DEFXX113Z
> 123EEFXX112 Zz
> 444cccvvbfdc
open(FILE, "yourfile") or die "can't open $!";
my(%LINES);
while(){
my($key) = split;
$LINES{$key) = $_ unless exists $LINES{$key);
}
close FILE;
# %LINES now has key value pairs of '123' and '444' as the keys and the
value is the first occurence in the file.
> -Original Mess
are you saying the variable looks like this?
$Record = "
"
if so, all you need to do is split , not sure what exactly is in your
record, but basically is done with split
@array = split / /, $Record;
again, the split parameter depends on what how $Record is to be parsed.
> -Original Mes
Assuming that each "line" of your variable is separated by a \n, you can use
the split() function.
my @array = split /\n/,$variable;
-Original Message-
From: Faymon, Kurt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 5:51 AM
To: [EMAIL PROTECTED]
Subject: Reading lines in v
On Tue, 1 Oct 2002, Faymon, Kurt wrote:
>
> Simple for some (most), perplexing me:
>
> have a variable, say $Record which contains many lines (actually codes),
> like:
>
>
>
>
>
> So on
>
> How can I roll through the value of the variable, capturing each line and
> pushing it onto an
Hi Paul,
Ihashes would need a little bit of work to work with this, as you will have
multiple entries with the same key, eg you have three lines beginning "123".
if you have all you lines in an array, you could do this:
foreach $line (sort @arry) {
die "Invalid input: $line\n" unless ($lin
and just so you don't try to load any blank lines into the hash and get an
error, throw in a check for blank lines
>
> open (INPUTFILE, $your_input_file) or die "Error opening
> $your_input_file: $!\n";
> my %uniq_hash;
>
> while () {
next if /^$/; ## SKIP BLANKS
> (my $first_f
Hi,
Thanks for all your help. I found the way Jeff wrote:
$sth = $dbh->prepare("SELECT * FROM table");
worked the best for what I wanted my program to do. I've nearly finished
writing my program now, after receiving a great deal of help from you guys
regarding MySQL with perl, how to use it, et
Matt Simonsen wrote at Tue, 01 Oct 2002 01:00:41 +0200:
> I need to get 2 fields out of a file which has the following format:
>
>
> #FIELD
> [tab]NAME=name to put into hash[newline]
> [tab]DATALINE=value to put with data[newline]
> [tab]EXTRA=several fields to ignore...
I wanted to do this without completely loading the
page into an array and then checking for duplicates.
So I just inserted some flags into my while statement.
#!/usr/bin/perl -w
$dupli_file = ;
chomp ($dupli_file );
$res_file = ;
chomp ($res_file );
open (DUPLI, "./$dupli_file") or die "Failed
Ahsplit. Forgot about that (Perl is new frontier); Split is now my
friend; thanks all.
> -Original Message-
> From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 9:14 AM
> To: 'Faymon, Kurt'; [EMAIL PROTECTED]
> Subject: RE: Reading lines in variable
>
On Tue, 1 Oct 2002, Kipp, James wrote:
>
> and just so you don't try to load any blank lines into the hash and get an
> error, throw in a check for blank lines
> >
> > open (INPUTFILE, $your_input_file) or die "Error opening
> > $your_input_file: $!\n";
> > my %uniq_hash;
> >
> > while () {
>
> > next if /^$/; ## SKIP BLANKS
>
> should have done that check, thanks for the correction
>
Actually Nikola's version saves us from needing this check by throwing in
the unless line :-)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I have a cgi application in which I have a database being read to get some
information displayed on screen, the problem is that information was read by
a text box on a flash, I changed the flash to an HTML with a text box and I
added 2 list boxes which I also want to read at the same time (if t
Hi,
I am the newest of beginners!! I have Oracle 8i on Windows XP. Where can I
download Perl? What do I download?
Thanks,
Shirley
begin 666 InterScan_Disclaimer.txt
M0U-502 R,# R.B @26UA9VEN92!T:&4@4&]S7-T96US($%N;G5A;"!52!A;'-O(&)E(&QE9V%L;'D@<')I=FEL
M96=E9"!A;F0O;W(@<')I8V4@2!G:79E;B!T:&%
http://activestate.com/Products/Download/Register.plex?id=ActivePerl
suggested.
> -Original Message-
> From: Shirley Frogge [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 01, 2002 10:34 AM
> To: Beginners@Perl. Org (E-mail)
> Subject: newest
>
>
> Hi,
> I am the newest of beginner
On Tue, 1 Oct 2002, Patricia Hinman wrote:
> I wanted to do this without completely loading the
> page into an array and then checking for duplicates.
The only case the entire file is read into memory is when all the lines in
the file are unique. But using a hash reduces the number of compariso
I'm trying to setup an autorun process on a CD that will run a perl script and output
to a web browser.
The CD will be used on Win32 machines that do not have Perl installed. The perl
binaries and library
files are on the CD. I have determined that I can run a batch file from the command
line
I dont find any search option in following site
http://archive.develooper.com/beginners%40perl.org/
Thanks
-
Anidil Patinatiyil Rajendran
Burlingame,California
650 730 8271 (W)
Hi: Yep. Once again, Tim and Zentara, you patiently remind me to use
just a little common sense. Thanks.
Tom
zentara wrote:
> On Mon, 30 Sep 2002 20:07:29 -0700, [EMAIL PROTECTED]
> ([EMAIL PROTECTED]) wrote:
>
>
>>Hi: I have both perl 5.6.1 and perl 5.6.0 on my system.
>>
>>What're the ste
There is a cgi list for cgi questions. You might be able to get better
answers from there. BTW, you might want to use a more specific subject as
well.
-Original Message-
From: Janfek Esquivel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 7:24 AM
To: [EMAIL PROTECTED]
Subje
Michael,
I have one question about you suggestion. From the way it looks you have
"Public" including all the other partitions. If I wanted to have CSP be the
"Dominate" partition I would flip-flop the two.
Is that correct?
Thanks
Lance
my %partitions = (
'Public'=> [$pu
David,
Ok here is a step by step of what I am trying to do.
1- User goes to a web page that has a file upload system on it.
2- User uploads file from their computer to the server via the web page (already built)
3- After file is uploaded another web page is automatically loaded (already buil
> From: Shirley Frogge [mailto:[EMAIL PROTECTED]]
>
>
> Hi,
Hi
> I am the newest of beginners!! I have Oracle 8i on Windows XP.
> Where can I download Perl?
> What do I download?
use google
>
> Thanks,
> Shirley
You're really a beginner:
>
>
> InterScan_Disclaimer.txt
> M0U-502 R,# R.B @26
On Tue, 2002-10-01 at 05:34, Janek Schleicher wrote:
> Matt Simonsen wrote at Tue, 01 Oct 2002 01:00:41 +0200:
>
> > I need to get 2 fields out of a file which has the following format:
> >
I put a real clip below ... should be more helpful.
> What is the exact data you want to separate.
I h
Hi all. I have most of the perl modules that I use installed into my home
directory. I am trying to install some that depend on others. This is simple
enough to add a "use lib" into the Makefile.PL , but I can't seem to figure
out how to set this when running tests. I tried inserting it into the t
In article <007f01c26596$989cd530$0300a8c0@jessee>,
[EMAIL PROTECTED] (Jessee Parker) writes:
>Is there any way to use the perl debugger to step through a script that
>forks a child (step into the child I guess is what I am asking)?
Yes. Run the program in an xterm window and the debugger will
Howdy,
The project I'm working on is getting a little big and I was just
wondering if anyone knows the standard and/or good ways to spread the
word and bring on a few new team members. I do realize that I could
always go with something like Source Forge and I could try posts on
relevant site
on Tue, 01 Oct 2002 15:24:40 GMT, Anidil Rajendran wrote:
> I dont find any search option in following site
>
> http://archive.develooper.com/beginners%40perl.org/
Try
http://groups.google.com/advanced_group_search?group=perl.beginners
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Paul And Joann Van Dalen wrote:
> Hi all,
>
> Given an input file that has the following records:
>
> 123ABCXX112Zz
> 123DEFXX113Z
> 123EEFXX112 Zz
> 444cccvvbfdc
> 444CCdvvbf
On Tue, Oct 01, 2002 at 12:33:34PM -0400, Balint, Jess wrote:
> Hi all. I have most of the perl modules that I use installed into my home
> directory. I am trying to install some that depend on others. This is simple
> enough to add a "use lib" into the Makefile.PL , but I can't seem to figure
>
Chad Kellerman wrote:
> Hi,
>
> I was wondering if someone can shed some light on a problem I am
> having. I have a sub routine that forks each variable in an array one
> at a time. But after the last element in the array the program exists
> from the sub routine, it does not continue aft
I'm a bit confused on why this is happening and I'm hoping someone can
shed some light on things for me. I read in information from a file which is
comma delimted and I use the parsing routine I found in the Perl Cookbook.
When it hits a name with " marks around it, it shifts everything over w
Brady Fausett wrote:
> David,
>
> Ok here is a step by step of what I am trying to do.
>
> 1- User goes to a web page that has a file upload system on it.
>
> 2- User uploads file from their computer to the server via the web page
> (already built)
>
> 3- After file is uploaded another web pa
Monthly posting statistics for perl.beginners - September 2002.
>From 2002-09-01 to 2002-09-30 there were
1896 articles posted (87758 lines) by 322 authors, giving an average
5.89 articles per author, and an average article length of 46 lpa.
The average number of articles per day was 63.
There
on Tue, 01 Oct 2002 17:55:21 GMT, Jessee Parker wrote:
> I'm a bit confused on why this is happening and I'm hoping
> someone can
> shed some light on things for me. I read in information from a file
> which is comma delimted and I use the parsing routine I found in the
> Perl Cookbook.
Paul And Joann Van Dalen wrote:
>
> Hi all,
>
> Given an input file that has the following records:
>
> 123ABCXX112Zz
> 123DEFXX113Z
> 123EEFXX112 Zz
> 444cccvvbfdc
> 444CCdvv
David,
Sweet, thank you for the information. Where can I find those Docs? I looked on
perldoc.com and was unsuccessful. Thanks again!
Brady
Brady Fausett wrote:
> David,
>
> Ok here is a step by step of what I am trying to do.
>
> 1- User goes to a web page that has a file upload syste
>Where can I find those Docs?
at your prompt (unix) type exactly what David showed you, ie.,
perldoc -f system
;)
>Brady Fausett wrote:
>
>> David,
>>
>> Ok here is a step by step of what I am trying to do.
>>
>> 1- User goes to a web page that has a file upload system on it.
>>
>> 2- User u
Brady Fausett wrote:
> David,
>
> Sweet, thank you for the information. Where can I find those Docs? I
> looked on perldoc.com and was unsuccessful. Thanks again!
>
> Brady
>
sorry for not begin clear on this! on the machine where you have Perl
install, type those in the command line:
pe
Thanks nkuipers and thanks David! I am reading away was I write this.
Brady
>>> nkuipers <[EMAIL PROTECTED]> 10/01/02 12:40PM >>>
>Where can I find those Docs?
at your prompt (unix) type exactly what David showed you, ie.,
perldoc -f system
;)
>Brady Fausett wrote:
>
>> David,
>>
>> Ok he
Hello all,
While reading the Cookbook, I came across the following on page 357:
"If the value assigned to a typeglob is not a reference but itself another
typeglob, then all types by that name are aliased. The types aliased in a
full typeglob assignment are scalarand format."
I have used
From: nkuipers <[EMAIL PROTECTED]>
> While reading the Cookbook, I came across the following on page 357:
>
> "If the value assigned to a typeglob is not a reference but itself
> another typeglob, then all types by that name are aliased. The types
> aliased in a full typeglob assignment are scal
All,
Or maybe David,
I appologize in advance for my lack of sight and/or insight...
I read those docs. How can I utilize those functions on the web? I am sorry I must
be really dense when it comes to this stuff... I have had the hardest time getting
this to work. I can run my script fro
Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5)
i need to find all possible combination from that list
1
12
123
1234
12345
13
134
1345
etc
Thank u all!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I have a text file and what I want to know is the instruction to read a text
box and 2 list boxes (at the same time or one at a time) from an HTML, so
with that information, be able to find information on my txt file.
Thanks in advance.
___
Brady Fausett wrote:
> All,
>
> Or maybe David,
>
> I appologize in advance for my lack of sight and/or insight...
>
> I read those docs. How can I utilize those functions on the web? I am
> sorry I must be really dense when it comes to this stuff... I have had
> the hardest time getting th
On Tuesday, October 1, 2002, at 02:27 PM, Brady Fausett wrote:
> All,
>
> Or maybe David,
I fall in the "All" category, but I'll try to help.
> I appologize in advance for my lack of sight and/or insight...
>
> I read those docs. How can I utilize those functions on the web? I
> am sorry I
On Tue, Oct 01, 2002 at 03:33:42PM -0400, Yannik Lefebvre wrote:
> Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5)
>
> i need to find all possible combination from that list
>
> 1
> 12
> 123
> 1234
> 12345
> 13
> 134
> 1345
>
> etc
Are you having problems with the Perl or the algori
So me what you've tried and I will be more than happy to help you fix
it.
James Gray
On Tuesday, October 1, 2002, at 02:33 PM, Yannik Lefebvre wrote:
> Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5)
>
> i need to find all possible combination from that list
>
> 1
> 12
> 123
> 1234
> 12
This looks like homework, but I'll give you a (one of many, I'd guess)
pseudocode solution:
sub print_combos(str,list) { # note -- PSEUDOCODE
if (empty(list)) {
# if (str != "") # do you want the empty list as an output?
print str;
} else {
x = pop list; #remove an element
Nkuipers wrote:
> Hello all,
>
> While reading the Cookbook, I came across the following on page 357:
>
> "If the value assigned to a typeglob is not a reference but itself another
> typeglob, then all types by that name are aliased. The types aliased in a
> full typeglob assignment are scalar
Janfek Esquivel wrote:
> I have a text file and what I want to know is the instruction to read a
> text
> box and 2 list boxes (at the same time or one at a time) from an HTML, so
> with that information, be able to find information on my txt file.
> Thanks in advance.
>
please check out CGI.p
Yannik Lefebvre wrote:
> Exemple: i have a list of numbers ( 1 - 2 - 3 - 4 -5)
>
> i need to find all possible combination from that list
>
> 1
> 12
> 123
> 1234
> 12345
> 13
> 134
> 1345
>
> etc
>
> Thank u all!
i found your problem insteresting! the following should solve it:
#!/usr/b
Lo,
I apologize if this request is less than coherent.
I'm running Win XP Pro using Perl 5.6.1. I'd like to do this:
open (ACCESSDB, "| C:\\Documents\ and\ Settings\\Doug\
Cacialli\\Desktop\\TEST
DATABASE.mdb")
or die "Something is amiss: $! \n";
Which starts Access, and requires the
From: "Cacialli, Doug" <[EMAIL PROTECTED]>
> I apologize if this request is less than coherent.
>
> I'm running Win XP Pro using Perl 5.6.1. I'd like to do this:
>
> open (ACCESSDB, "| C:\\Documents\ and\ Settings\\Doug\
> Cacialli\\Desktop\\TEST
> DATABASE.mdb")
> or die "Something is amiss:
Doug Cacialli wrote:
> Lo,
>
> I apologize if this request is less than coherent.
>
> I'm running Win XP Pro using Perl 5.6.1. I'd like to do this:
>
> open (ACCESSDB, "| C:\\Documents\ and\ Settings\\Doug\
> Cacialli\\Desktop\\TEST
> DATABASE.mdb")
> or die "Something is amiss: $! \n";
>
>
On Tue, Oct 01, 2002 at 02:01:53PM -0700, david wrote:
> i found your problem insteresting! the following should solve it:
Well in that case, please hand this one in for me.
perl -e'*,=sub{print+local$*=$*.$_[$_],$/,&,(@_[1+$_..$#_])for$#..$#_};&,(1..5)'
Different algorithm, different results,
On Mon, Sep 30, 2002 at 03:50:00PM +0800, [EMAIL PROTECTED] wrote:
> I found my mistake: I misread the line number in the error message. DOH!!!
> The complaints were related to the block that prints individualized error
> messages:
Ok, I'm glad you solved your problem.
>
> unless (defined $di
On Tue, Oct 01, 2002 at 10:38:52AM -0500, Lance Prais wrote:
>I have one question about you suggestion. From the way it looks you have
> "Public" including all the other partitions.
If the partition is "Public" the information is appended to all of the
files. This is exactly what your origi
On Fri, Sep 27, 2002 at 09:36:41AM -1000, Josh wrote:
> I meant that I issued those commands from the command line. So even with
> the file owned by nobody and everything is world read/writable I still get
> a permission denied error.
What does ls -l on the file output? In your program, what are
Just saw this package on the Oct-2 UsePerl newsletter, would anyone who
tried this share some comment on it? how is the performance compare to
a mod_perl setup?
Thanks.
Tor.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
75 matches
Mail list logo