Ahammell wrote at Wed, 12 Jun 2002 05:32:19 +0200:
Janek Schleicher wrote:
It's a real crime to copy source code.
I missed to say :-). Sorry.
Here you see why.
Cheerio,
Janek
Janek,
Im sorry but I dont quite understand your statements. I
---CODE---
open(USER, user.dat);
@user = USER;
close(USER);
-END CODE-
Ok thats my textfile and this is how I usually read
through the lines
---CODE---
foreach $line (@user) {
chomp($line);
($name, $site, $site_id, $des, $email,
$pass) = split(/\|/,$line);
}
Ok, what is it that you want? It's hard to read when the code is split up over
the page.
Maybe it already answered your questions ??
#!/usr/local/bin/perl
#
$username = param('username');
open(USER, user.dat);
while (USER) {
chomp;
($name, $site, $site_id, $des, $email, $pass) =
I'm starting to make a perl/cgi/html based multi-player game called 3MF (Massive
Multiplayer Medieval Frolic). So far I've made an account creation screen that writes
the data to two flat file db's one of them holds the usernames passwords, while the
other holds all the user information.
foreach $i (@access) {
chomp($i);
($un,$pw) =
split(/\|/,$i);
}
at the end of this loop, $un and $pw contain the last element of
@access.
__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Thank you for the tips. I appreciate it. Sorry about the misunderstanding.
--Al
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks but I don't think that will work because as someone pointed out my foreach loop
leaves me with only the last elements of @access.
I need it to give me all the elements in two @s I'll see if I can figure it out maybe
someone know the best way?
On Wed, 12 June 2002, David vd Geer Inhuur
on Wed, 12 Jun 2002 12:51:29 GMT, [EMAIL PROTECTED] (Ben
Huyghebaert) wrote:
Here is the code I'm using right now. I open up the file with
the usernames and passwords and throw it all into @access and
then do this
If you put your username/password pairs in a hash instead of an
Ben --
...and then Ben Huyghebaert said...
%
% Thanks but I don't think that will work because as someone pointed out my foreach
loop leaves me with only the last elements of @access.
Well, it did that as you wrote it; you looped through the whole file and
*then* started any comparing.
I
First of all I would strongly recommend using DBI for this. It will allow
you to use flat files now then upgrade to a database later with almost no
code changes.
That being said, there are a few ways you can do this, the simplest being
this:
# untested
my $valid_user = grep
hey there,
i'm having a number of problems with inserting and retrieving extended
characters in Oracle (such as é) from a form.
The problem's present both with sending the characters, and with retrieving
them for display in HTML.
Has anyone else used HTML forms to send french characters to Oracle
On Tue, 11 Jun 2002, Jeff 'japhy' Pinyan wrote:
modifies the ACTUAL argument you passed to rcsname()? Only if you had
done
sub rcsname {
$_[0] =~ s/foo/bar/;
}
or some other specific effort would you have modified the argument to the
function.
So Perl passes subroutine
Hey Thiago,
My MUA believes you used Microsoft Outlook Express 5.00.2615.200
to write the following on Tuesday, June 11, 2002 at 3:39:03 PM.
TF Hi
TF I need to control the access for some files in my httpd and I'd like to know if I
can do this by knowing the IP of the computer that is
Thanks for that
Jenda Krynicky wrote:
Then how come
$x = 'Hello';
sub foo {
$_[0] = 'Hi';
}
foo($x);
print $x,\n;
prints
Hi
?
The parameters are passed by reference, though in little strange way.
If for example you
Bob --
...and then bob ackerman said...
%
% On Tuesday, June 11, 2002, at 03:02 PM, David T-G wrote:
%
% ...and then bob ackerman said...
% %
% % i am trying to login to DI-704 DLink router.
%
% Why was this in the killing idle users thread instead of in your
...
%
% i don't know what i did
Hi folks!
Well, just to sum it up, how I finished this one off:
my %config;
my ($parameter, @value);
open(TEMP,'/tmp/Config') || die cannot open temporary file for
output!! : $!;
local $/;
$contents = TEMP;
close TEMP;
$contents =~
on Wed, 12 Jun 2002 10:43:14 GMT, [EMAIL PROTECTED] (Harry
Jackson) wrote:
Has anyone ever wrote a script that creates a schema for MySql or
Postgres. I am just wondering how you would have went about it. I
am going to have to write an installation type script and was
thinking about Perl
Hi Janek.
Yes. That's what I'm looking for. Thanks a lot.
H. Heggen
-Ursprüngliche Nachricht-
Von: Janek Schleicher [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 12. Juni 2002 12:35
An: [EMAIL PROTECTED]
Betreff: Re: Does something exists in Perl such as JTabbedPane in Java
Heiko
Hi,
The perl script I'm modifying requires a input file to be passed and a
output device. For example:
C:\runme.pl filename output-device
How can I display this to the screen?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi!
...and then phumes1 said...
%
% Hi,
%
% The perl script I'm modifying requires a input file to be passed and a
% output device. For example:
%
% C:\runme.pl filename output-device
%
% How can I display this to the screen?
I'm not sure what it is you want to display... If you want that
ps: on the Upside - I like Craig Moynes basic quick Port
Thanks :) That's all I was going for, I was aching to do some coding this
week and it seemed like a good excuse.
I knew it was ugly usage of shell and the like, but a good base is a nice
place to start from, broad strokes first.
Using export TMOUT kills the tty, but the application
(lovely thing that it is) stays up in the background,
unattached. Thus creating an even more difficult beast to
track down and, well, kill. IBM's response? (In summary) Tell
the vendor their app is not responding correctly, and have em
on Wed, 12 Jun 2002 12:16:55 GMT, [EMAIL PROTECTED] (Anders
Holm) wrote:
I have a feeling that there will be takers for optimising this as
well, so enlighten me if you wish
With a little help from the Cookbook I came up with this:
#! perl -w
use strict;
my %parameters = ();
On Tuesday, June 11, 2002, at 08:40 , bob ackerman wrote:
[..]
this is what is failing.
when i try this POST from the shell command line, i get:
echo 'RC=@DACCT=rootPSWD=71:29:26URL=admin' | POST -u -U -s -S
-e -x 'http://192.168.0.1/cgi-bin/logi'
[..]
LWP::UserAgent::request: Simple
Hi, all --
I'm trying to be good and so I use my $variable rather than making them
global, and I prefer to not stick little [potentially-confusing] my
declarations around through the code so I declare my vars up front.
While some of them might usefully be pre-filled, many of them can happily
by
On Wednesday, June 12, 2002, at 05:31 , phumes1 wrote:
The perl script I'm modifying requires a input file to be passed and a
output device. For example:
C:\runme.pl filename output-device
How can I display this to the screen?
what you will want to find in the runme.pl
is where the
I need to print the filename to the screen.
C:\runme.pl filename output-device
I have the following in my script:
$test = $2 @ARGV;
print Results: $test\n;
Which output:
filename output-device
I require just the filename
Should I be using an array for this or substr?
--
To unsubscribe,
On Wednesday, June 12, 2002, at 05:16 , Anders Holm wrote:
Well, just to sum it up, how I finished this one off:
Looks reasonably good there.
The things uncle drieux wants are
a) Internal comment bars that will remind you
a1) where you ripped off which ideas from
@ARGV contains all of the arguments passed, and you only want to print the
first, so you need to specify that.
$test = $2 $ARGV[0]; # 0 is the first element
Rob
-Original Message-
From: phumes1 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 9:49 AM
To: [EMAIL PROTECTED]
Hello,
Last time I got so much feedback that I will try it again. I learned a lot of
the last recommendations, but the next issue could not be made more efficient by
me. Can you ?
#!/usr/local/bin/perl
#
my $base = /user/IPlib/IPlib/Analog_CMOS/Camera; ## Set temporarily for this test,
On Wednesday, June 12, 2002, at 06:24 , Akens, Anthony wrote:
Using export TMOUT kills the tty, but the application
(lovely thing that it is) stays up in the background,
unattached. Thus creating an even more difficult beast to
track down and, well, kill. IBM's response? (In summary)
on Wed, 12 Jun 2002 13:39:41 GMT,
[EMAIL PROTECTED] (David T-G) wrote:
Hi, all --
I'm trying to be good and so I use my $variable rather than
making them global, and I prefer to not stick little
[potentially-confusing] my declarations around through the code
so I declare my vars up
Hi!
Try this out:
#!c:\perl\bin\perl.exe -w
use strict;
my $param1 = $ARGV[0];
printf ($param1);
if you run: perl runme.pl para1 para2 para3
the output is only:
para1
H.Heggen
-Ursprüngliche Nachricht-
Von: phumes1 [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 12. Juni 2002 15:49
I'm trying to be good and so I use my $variable rather than making
them global, and I prefer to not stick little [potentially-confusing]
my declarations around through the code so I declare my vars up
front.
This is a matter of personal taste, but they should not be too far
up front ...
-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 9:40 AM
To: perl beginners
Subject: lazy variable declaration
Hi, all --
I'm trying to be good and so I use my $variable rather than
making them
global, and I prefer to not stick
I'm using the following command to output the results to screen and a
output file:
open(F,tee $2 @ARGV[0].txt CON:);
This works great but the output file created filename.txt has a box
ascii character. Looks like a carraige return also.
How can I remove this?
--
To unsubscribe, e-mail:
David vd Geer Inhuur tbv IPlib wrote:
Hello,
Last time I got so much feedback that I will try it again. I learned a lot of
the last recommendations, but the next issue could not be made more efficient by
me. Can you ?
#!/usr/local/bin/perl
#
my $base =
This should work, shouldn't it?
open(CONFIG,/home/mnorris/$first_file) || die Sorry, I couldn't create
/home/mnorris/$first_file\n;
while (CONFIG) {
$_ =~ s//$first_var/;
}
close(CONFIG);
It should be opening the file named $first_file (created earlier in
On Jun 12, Elias Assmann said:
On Tue, 11 Jun 2002, Jeff 'japhy' Pinyan wrote:
modifies the ACTUAL argument you passed to rcsname()? Only if you had
done
sub rcsname {
$_[0] =~ s/foo/bar/;
}
or some other specific effort would you have modified the argument to the
function.
So
-Original Message-
From: Michael Norris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 10:24 AM
To: [EMAIL PROTECTED]
Subject: Simple Substitution
This should work, shouldn't it?
open(CONFIG,/home/mnorris/$first_file) || die Sorry, I
couldn't create
On Jun 12, David vd Geer Inhuur tbv IPlib said:
if ( m/^user:/ ) {
my $user = (split, /:\s*/)[1];
our @users = split(/,/, $user);
Why are you using 'our' here? It seems a bit odd. And you have an error
in your code that sets $user:
my $user = (split, /:\s*/)[1];
Hi all,
I thought getting the date would be like how it's in a shell script `date` but it does
not seem to be working. Could someone please advise me on this I tried searching
archives on date but didn't get anything useful. It's possible I'm looking in the
wrong place.
Thanks in advance
Hi again --
...and then David T-G said...
%
% I'm trying to be good and so I use my $variable rather than making them
% global, and I prefer to not stick little [potentially-confusing] my
% declarations around through the code so I declare my vars up front.
I wasn't terribly clear here... At
On Jun 12, Leila Lappin said:
I thought getting the date would be like how it's in a shell script
`date` but it does not seem to be working. Could someone please advise
me on this I tried searching archives on date but didn't get anything
useful. It's possible I'm looking in the wrong place.
Hi
I need a script that modify the UID field in a /etc/passwd file
for UNIX
the purpose is to change the existing UID field from a start number (Eg 5000 )
for the first line then do UID + 1 for the next line etc etc until EOF
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Nope,
open(CONFIG, /home/mnorris/$first_file) || die Sorry, I couldn't READ
/home/mnorris/$first_file\n;
while (CONFIG) {
s//$first_var/;
push @newdata, $_;
}
close(CONFIG);
open(NEWCFG, /home/mnorris/$first_file) || die Sorry, I couldn't WRITE to
HI Frank,
You can use this one :
#!/usr/local/bin/perl
my $file = /etc/passwd;
my $temppwfile = /etc/tmppasswd;
$teller = 5000;
open(PW, $file);
open(NEWPW, $temppwfile);
while (PW) {
($user, $pw, $uid, $grpid, $descr, $home, $shell) = split(/:/);
$newline =
On Wednesday, June 12, 2002, at 10:46 , Leila Lappin wrote:
[..]
I thought getting the date would be like how it's in a shell script `date`
but it does not seem to be working. Could someone please advise me on
this I tried searching archives on date but didn't get anything useful.
It's
David T-G wrote at Wed, 12 Jun 2002 15:39:41 +0200:
I'm trying to be good and so I use my $variable rather than making them global,
and I prefer to
not stick little [potentially-confusing] my declarations around through the code
so I declare my
vars up front. While some of them might
From: Jeff 'japhy' Pinyan [EMAIL PROTECTED]
On Jun 12, Elias Assmann said:
So Perl passes subroutine arguments by reference? I thought they
would be copies in the first place...
Don't say pass-by-reference, since reference means something
entirely different in Perl. It's
On Wednesday, June 12, 2002, at 07:07 , phumes1 wrote:
I'm using the following command to output the results to screen and a
output file:
open(F,tee $2 @ARGV[0].txt CON:);
This works great but the output file created filename.txt has a box
ascii character. Looks like a carraige return
Frank, et al --
...and then David vd Geer Inhuur tbv IPlib said...
%
% You can use this one :
...
% Be aware of a possible (last)NIS-entry(s), those doesn't need a 5000 number in it's
entry. And make sure to not change the lp, root, adm, etc.. That will make your life
% real hard you see.
Ok, I'm trying to understand this.
open(CONFIG, /home/mnorris/$first_file) || die Sorry, I couldn't READ
/home/mnorris/$first_file\n;
while (CONFIG) {
s//$first_var/;
push @newdata, $_;
}
close(CONFIG);
this pushes the replaced values into @newdata? How is this keeping
I am very new to perl and wondering if there is something in Perl similar
to header files in C? Please direct me.
Thanks,
Al
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Alaric --
...and then Alaric Joseph Hammell said...
%
% I am very new to perl and wondering if there is something in Perl similar
% to header files in C? Please direct me.
In one viewpoint, no; everything you need for i/o or file management or
whatnot is already a part of perl.
In another
On Wednesday, June 12, 2002, at 11:13 , Alaric Joseph Hammell wrote:
I am very new to perl and wondering if there is something in Perl similar
to header files in C? Please direct me.
I'm not sure I get your question here - since a
header file is merely a way of defining
a) constants
Does anyone have any advice on how to write to an EXISTING MS Excel file?
The goal is to have a script update values in an excel file.
Thanks,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
As far as I know this isn't possible. Admittedly reading in an existing
Excel file and then writing it out with changes is not as elegant is it an
option ?
-
Craig Moynes
Student-On-Call
netCC Development
Tel: (905) 316-3486
[EMAIL PROTECTED]
Alaric Joseph Hammell wrote at Wed, 12 Jun 2002 20:13:46 +0200:
I am very new to perl and wondering if there is something in Perl similar to header
files in C?
Please direct me.
You can simulate it with
do '$filename';
But it's not very Perlish in the most cases.
Just use either a module
David T-G wrote at Wed, 12 Jun 2002 19:42:46 +0200:
...
% - Now Perl's complaining about many no declared variables. % - You declare
them all at the
beginning.
In this limited context, yes. I wouldn't usually declare them all up front.
Well, I thought you never do (as I know you're
Janek, et al --
...and then Janek Schleicher said...
%
% David T-G wrote at Wed, 12 Jun 2002 19:42:46 +0200:
%
...
%
% In this limited context, yes. I wouldn't usually declare them all up front.
%
% Well, I thought you never do (as I know you're not a beginner any more)
Oh, I'm still a
On Wed, 12 Jun 2002, Jeff 'japhy' Pinyan wrote:
On Jun 12, Elias Assmann said:
On Tue, 11 Jun 2002, Jeff 'japhy' Pinyan wrote:
modifies the ACTUAL argument you passed to rcsname()? Only if you had
done
sub rcsname {
$_[0] =~ s/foo/bar/;
}
or some other specific effort
David T-G wrote at Wed, 12 Jun 2002 21:50:12 +0200:
% I would try to write it as
% while () {
%my ($artist, $album, $track) = split m:/:;
%if ($track eq $foo) { # $foo eq $foo :-)
% ...
%}
% }
I don't see a difference here except that you're using a variable $foo
David,
Could you turn off your MUA's option for sending your email
messages out as quoted-printable? Reading your posts has
been difficult at best on an xterm where there is no MIME.
(see included text, below)
It seems you're using mutt as an MUA - I think you should be
able to configure it
Janek, et al --
...and then Janek Schleicher said...
%
% David T-G wrote at Wed, 12 Jun 2002 21:50:12 +0200:
%
% % I would try to write it as
% % while () {
% %my ($artist, $album, $track) = split m:/:;
% %if ($track eq $foo) { # $foo eq $foo :-)
% % ...
% %}
% % }
%
I think these kinds of messages would be cooler if you asked an unanswerable
or stupid question like:
Can I use the perl debugger to get rid of the mosquitos in my room?
-Original Message-
From: Ho, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 5:12 PM
To: '[EMAIL
Or..what the hell am I doing here ?? :)
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 5:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: THIS IS A TEST - PLEASE DELETE THIS EMAIL - THANKS
I think these kinds of messages would be cooler
On Wednesday, June 12, 2002, at 06:39 , David T-G wrote:
[..]
my # vars we will use
(
$m3u, # file name
$mp3, # disk label
$source,$host,
I'm looking for a Perl module that, when given a Quicktime MOV file, will
calculate the dimensions of the movie. I've found modules that'll find the
dimensions for certain still image formats (Image::Info and Image::Size, as
well as PerlMagick), and MPEG files, but not Quicktime MOV files.
I need to write to an existing excel file, which is not supported by any
existing module. Therefore, what I will have to do is read the excel file
using Spreadsheet::ParseExcel, replace the specific values that I am
interested in writing, and then write a new excel file using
Anthony Akens wrote:
Hello,
Hello,
I'm a sys-admin on an AIX (4.3) machine, and I'm trying to work
with a vendor program that doesn't behave very nicely. Basically,
if a user's connection to the server is inappropriately severed
the application keeps right on chugging, leaving the user
Kevin Old wrote:
Hello all,
Hello,
What I'd like to do is create a popup menu on a web page that
has the hours 00-59 in it. Thing is, the only way I can come
up to do it is by writing out something like below..and then
putting a reference to this array in the code for the popup
John W. Krahn wrote:
#!/usr/bin/perl -w
use strict;
my $results = '/home/danb/killemresults';
open RES, '', $results or die Cannot open $results: $!;
print \n . localtime() . \nStarting\n;
for my $user ( map [ (split)[0,1,4] ], grep m|\bpts/|, `w -l` ) {
# print RES $user-[1]\n;
Hello,
I'm trying to do a news feed type of script from an admin page. I need to
open up a page and find the line that starts with !--news feed-- and
insert $html right after that. I'm drawing a blank on how to search for
that line. This is probably easy, but I can't think of how to do it.
Hi,
I have a refence to a hash, which is $hashref. I want to print out the
name of the hash ( which is %hash ) from $hashref, but don't know how.
Could you please help? thanks!
#-
%hash= {
apple = red,
bana = yellow,
};
$hashref =\%hash;
print ?hashref;
#-
Carlos
--
To
On Wed, Jun 12, 2002 at 08:30:12PM -0700, W. Huang wrote:
I have a refence to a hash, which is $hashref. I want to print out the
name of the hash ( which is %hash ) from $hashref, but don't know how.
Could you please help? thanks!
#-
%hash= {
apple = red,
bana = yellow,
};
77 matches
Mail list logo