Hi all,
%allusers = (
'users' => {
'user' => 'Test Account',
'*Crudles' => 'Hello World',
'Crud' => 'Another Test',
Dan,
Just figured it out...
my $backup = #Dir in hash somewhere. Not important
-T $backup || open(BACKUP, ">/tmp/passwd_backup");
Very, very cool!
Cheers,
Dan
Hi all,
I want my perl code to be able to check to see if a file exist and if
the file doesn't exist I want that file to be c
Hi all,
I want my perl code to be able to check to see if a file exist and if
the file doesn't exist I want that file to be created. What would be my
best way of going about this?
Something like...
$backup_file = $conhash{$title}{'Linux Passwd Backup'}; #Grab location
from a directory located
Joshua Colson wrote:
>
> I have this code that is acting strange... does anyone know why.
>
> open( CONFIG, "+
> while( ) {
> print;
> print CONFIG;
> }
>
> close( CONFIG );
>
> The first time I run the script, it reads the file, which is one line, and
> duplicates that line.
> Now, corr
* Kiarash Em. ([EMAIL PROTECTED]) [11 Dec 2001 06:29]:
> mySQL vs postgreSQL?!?!
> check this out
> http://www.phpbuilder.com/columns/tim2705.php3?page=1
> ;)
Hmm. Seems rather out of date wrt postgres.
8kb rows? Is that of data? Because postgres quite happily has field
types that allow
COLLINEAU wrote:
>
> I 've written the code below.
> There is a problem with "rename": i have the message: "permission denied".
>
> Nevertheless, I have all the rights.
>
> What 's happen ?
Just a guess but it could be that your OS will not let you rename a file
that is open. You don't have t
Shaunn Johnson wrote:
>
> It's not so much the logic of the script that I'm concerned
> with, but the security part. For instance, sometimes if I
> create a user by hand, editing the /etc/passwd (using vipw)
> doesn't really edit the /etc/shadow file. I'm not sure why,
> either. It *should*.
Joshua Colson wrote:
>
> Hello Perl Mongers,
>
> I'm trying to compare two lists of users, but I would like input on what
> each of you think would be the best way to do it?
>
> The first list is comprised of all users in a particular group, in the
> /etc/group format.
> The second list is ve
Shiping Wang wrote:
>
> Hi , I have following a record file like this:
>
> [snipped data. see below]
>
> What I want output is:
>
> CustProdCata
> 1711
> 842 1523C
> 9306152 B
> 24727 15225 A
> 46917 9828B
> 50 4309C
>
> For each customer, I only se
With this code, I get :
#!/usr/bin/perl -w
my $ordfile=shift || die "unable to open : $!s\n";
open (LIST, "<$ordfile") || die "unable to open file $ordfile : $!\n";
while () {
# chomp; # a)
my $line=$_;
print STDERR "\nline : *** $line ***";
}
line : *** 6M2FD9XV
***
line : ***
Hello List,
I am using Data:Dumper in a script and am running into a problem with "use
strict" and eval. Basically the conundrum is that the data I will be loading from the
Data::Dumper file is going to be based off input to the final script, so it may not be
the same for each run of t
Hi,
Try Win32::Netadmin. It has all the modules to handle user accounts in
NT.
\|||/
(o o)
ooO-(_)-Ooo
Norishaam Adam
MSA Field Services
-Original Message-
From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 7:48 PM
--- Mike Butler <[EMAIL PROTECTED]> wrote:
> I need to create a status bar for users who are
> uploading pdf files, some of them quite large, to a
> web site. Some of the users are on dial-up and the
> upload time could be quite lengthy, so they need to
> know that their upload is progressing and
--- Mike Butler <[EMAIL PROTECTED]> wrote:
> I need to create a status bar for users who are
> uploading pdf files, some of them quite large, to a
> web site. Some of the users are on dial-up and the
> upload time could be quite lengthy, so they need to
> know that their upload is progressing and
I have this code that is acting strange... does anyone know why.
open( CONFIG, "+ ) {
print;
print CONFIG;
}
close( CONFIG );
The first time I run the script, it reads the file, which is one line, and
duplicates that line.
Now, correct me if I'm wrong, but I would think that each time this
I need to create a status bar for users who are
uploading pdf files, some of them quite large, to a
web site. Some of the users are on dial-up and the
upload time could be quite lengthy, so they need to
know that their upload is progressing and not to
cancel the operation.
Is there a way to do th
You are right. I looked at but only saw the ..\.. and not that they were
switched. I tested(this time) and it worked as it should. You don't need to escape the
.'s.
Wags ;)
-Original Message-
From: Agustin Rivera [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 15:41
T
Well, besides escaping the periods, you also have it backwards. It should
be
open(Workflow, "workflow.txt") || die $!;
Unless someone knows something I don't..but I couldn't get it to work your
way.
Regards,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Messag
I am using the following statement to open a document.
open("..\..\workflow.txt", "Workflow")|| die "Cannot open Workflow $!\n";
1. the perl.exe resides in e:\perl\bin\perl.exe
2. the workflow.txt reside is e:
3. the error I am getting is "Cannot open workflow No Such file or
directory"
What am
you are escaping your .'s though not want you want to do:
need either ..\\..\\workflow.txt or ../../workflow.txt
Use one or other and should work if file is there.
Wags ;)
-Original Message-
From: Lance Prais [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10
Hi!
I 've written the code below.
There is a problem with "rename": i have the message: "permission denied".
Nevertheless, I have all the rights.
What 's happen ?
Franck
___
#!/usr/bin/perl -w
$now=time;
opendir (INFO,"l:/
This may sound too simple but this is the way I would have done it.
In the front-end script, initialize the variables
$VAR_1="";
$VAR_2="";
Then in the child scripts, you can change these variable
$VAR_1="foo1";
$VAR_2="foo2";
If you use strict (what happens?). I have not tried it yet.
--- Mike Gargiullo <[EMAIL PROTECTED]> wrote:
> Oracle is
>
> How many inserts/second are you taking about?
If anyone would like to follow-up on this, it might be better to email me directly
rather than
continue this very off-topic thread :)
I don't know how many inserts per second.
In Bourne shell, you could do:
for i in `echo name_a name_b name_c name_d name_e name_f name_g`
do
echo "creating user account: $i"; passwd $i< secret_$i
done
--
In C-sh
foreach i (`echo name_a name_b name_c name_d name_e name_f name_g`)
echo "cre
Oracle is
How many inserts/second are you taking about?
-Original Message-
From: Curtis Poe [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 3:52 PM
To: Etienne Marcotte
Cc: [EMAIL PROTECTED]
Subject: Re: mysqlpostgres
--- Etienne Marcotte <[EMAIL PROTECTED]> wr
--- Etienne Marcotte <[EMAIL PROTECTED]> wrote:
> MySQL is about speed, unless you do tons of inserts and absolutely can't
> afford table locking, go with mysql..
Regrettably, we do have to handle tons of inserts, so this is problematic. The
software that
we're evaluating databases for offers
> I want to print just the web result with any other
> information on the page. How can i do that ?
It's in the browser, not a cgi problem.
Look for "page setup" or equivalent in your browser.
Then disable headers and footers.
- Flávio Soibelmann Glock
--
To unsubscribe, e-mail: [EMAIL PROT
Howdy:
It seems that this would have been brought up a few
times, but, is there a script in around to create
multiple unix accounts? Rather, I have a lot of accounts
to create and I don't want to go over them by hand every
time a batch of request comes in.
It's not so much the logic of the scri
well
mySQL *DO* now support transactions with innoDB
www.innoDB.com
There is a guy from the innoDB team also on the [EMAIL PROTECTED]
that can probably answer all your questions.
MySQL is about speed, unless you do tons of inserts and absolutely can't
afford table locking, go with mysql..
Plu
--- "Kiarash Em." <[EMAIL PROTECTED]> wrote:
>
> mySQL vs postgreSQL?!?!
>
> check this out
>
> http://www.phpbuilder.com/columns/tim2705.php3?page=1
>
> ;)
While we're on the subject of databases, my company is considering switching from MS
SQL Server.
We absolutely need transactions,
code snipplet please? :-)
It would really help us to help you!
Etienne
Joe Echavarria wrote:
>
> Hi there,
>
> I have made a web based application using perl, and
> when i try to print a search result page i always get
> at a footer note indicating the path of the file, the
> date and at t
Hi there,
I have made a web based application using perl, and
when i try to print a search result page i always get
at a footer note indicating the path of the file, the
date and at the top of the page other information like
"page 1 of 1".
I want to print just the web result with any other
mySQL vs postgreSQL?!?!
check this out
http://www.phpbuilder.com/columns/tim2705.php3?page=1
;)
>From: "Brett W. McCoy" <[EMAIL PROTECTED]>
>To: nafiseh saberi <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: Re: mysqlpostgres
>Date: Thu, 6 Dec 2001 06:57:41 -0500 (EST)
>
>O
Is there a way to change the size of a text field to dynamically fit the
size of the client window?
Currently I'm using this in cgi.pm
print $query->textarea($entry,$old_values,10,75) . "\n ";
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
it is dhtml/javascript
onload function in the body tag that sets focus on a particular form
element form.fieldname
HTH
Etienne
Kevin Harwood wrote:
>
> Is there a way to place the cursor in a text field automatically upon
> loading a cgi form?
>
> Here is the field and some of the code:
>
http://www.wiley.com/legacy/compbooks/stein/text/javascript.txt
This link will take you to the 'OFFICIAL GUIDE TO PROGRAMMING WITH CGI.PM'
website which lists code examples, and specifically this one
shows how to use Javascript with CGI.
hth,
Maurice Reeves
>From: "Kevin Harwood" <[EMAIL PROTE
Is there a way to place the cursor in a text field automatically upon
loading a cgi form?
Here is the field and some of the code:
print $query->start_form();
print "";
print "Tool Name";
print $query->textfield('name'), "\n";
print "";
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
If already cleaned up, then could
$phonenbr = substr($phonenbr,0,10);
Wags ;)
-Original Message-
From: rory o'connor [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 10:03
To: [EMAIL PROTECTED]
Subject: only accept 10 characters
Thanks for everyone's help so f
Thanks for everyone's help so far! This is an enjoyable list to read
everyday.
OK, can someone tell me how to take a variable that *may* be over 10
characters, and blow away anything after the 10th caracter?
I am operating on phone numbers and the first thing I am doing is blowing
away any
At 11:28 AM 12/10/01 -0600, Booher Timothy B 1stLt AFRL/MNAC wrote:
>I want to be able to rename a file name from one number series to
>another number series ie:
>
>Image1.jpg
>Image2.jpg
>Image3.jpg
>
>
>to
>
>Foo234.jpg
>Foo235.jpg
>Foo236.jpg
>
>
>Is there a way to do this using regular
Hi,
I have a Mandrake Linux machine running Perl 5.6.0 from the installation
RPM's. I have tried, several times unsuccessfully, to upgrade to Perl
5.6.1 and am running into all kinds of problems...too numerous to
mention here. Bottom line is this...I'd like to just remove all
instances of Perl
http://perl.apache.org/guide/
That is the place
As for scripts, well if you are already coding strict, not declaring
file scoped variables, it should not be very difficult. The guide gives
the most common "mistakes" and ways to correct them.
The best thing is to test your scripts on a local net
Hello all,
I'm a UNIX administrator with prior experience with Perl CGI on Windows
NT. It looks as if I may be taking on some new Perl work which will
make use of mod_perl with Apache. All I know so far about mod_perl is
that the perl scripts run as part of the Apache process instead of
forking
Hello - I have been trying to use perl to change filenames this morning, and
have been having a lot of luck, but have hit a stopping point. I have
lwall's code:
#!/usr/local/bin/perl
#
# Usage: rename perlexpr [files]
($regexp = shift @ARGV) || die "Usage: rename perlexpr [filenames]\n";
if (!
From: Jon Molin <[EMAIL PROTECTED]>
> I'm trying to use eval () with a constants module and it works very
> funny, can anyone explain this behavior to me. It seems to me as this
> is a scope thing. If i remove the 'my' it works fine but i can't see
> why it shouldn't work with my:
>
> i have a mo
Hello Perl Mongers,
I'm trying to compare two lists of users, but I would like input on what
each of you think would be the best way to do it?
The first list is comprised of all users in a particular group, in the
/etc/group format.
The second list is very similar, but the format is slightly d
Hi , I have following a record file like this:
Customer ID:1711
* * * No record * * *
Customer ID:842
Product ID: 716
Category:A
Product ID: 1523
Category:C
Product ID: 753
Category:D
Product ID: 76
Customer I
Thanks David, that solved my problem.
-Original Message-
From: Wagner-David [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 12:29 PM
To: Epperson, Randall W; Perl Beginners list (E-mail)
Subject: RE: Problem with replacing hash elements
Here is a shot which works with
Hi list,
I'm trying to use eval () with a constants module and it works very
funny, can anyone explain this behavior to me. It seems to me as this is
a scope thing. If i remove the 'my' it works fine but i can't see why it
shouldn't work with my:
i have a module with constants (constants.pm):
##
Perhaps the more idiomatic way to do what you want
would be:
use strict;
my $directory = shift;
chdir $directory or die "Unable to change to directory: $!\n";
while (<*>) # this automagically loops through the current dir
{
# I think you're trying to get last accessed date
print -A, "\n"
I have found
Thanks
-Message d'origine-
De : COLLINEAU Franck FTRD/DMI
[mailto:[EMAIL PROTECTED]]
Envoyé : lundi 10 décembre 2001 11:08
À : '[EMAIL PROTECTED]'
Objet : Stat function
Greetings,
I have the following code:
opendir (INFO,"l:/01_informatique") || die " impossible d'ouvri
Greetings,
I have the following code:
opendir (INFO,"l:/01_informatique") || die " impossible d'ouvrire le
répertoire 01_informatique: $!";
while ($fic=readdir INFO)
{
if($fic=~/^c/)
{
@date=stat($fic);
print "$date[7]\n";
}
}
close INFO;
On Mon, Dec 10, 2001 at 08:12:42AM -0800, Lance wrote:
> If I want to read through a text file and parse out the information in order
> to sort or compare data how would I begin to tackle this task?
>
> I understand logically how I it would work just not sure how to do it in
> perl.
---end quoted
If I want to read through a text file and parse out the information in order
to sort or compare data how would I begin to tackle this task?
I understand logically how I it would work just not sure how to do it in
perl.
Thank you
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
well
Use cookies or pass the member name to the posting script
I mean there aren't 20 ways to pass variables to a script..
Either the username is sent to the script by a cookie, or in the hidden
field of a form, but then you'd have to always make your link as forms,
which is way longer to code
Just want to thank eveyone who responded. I have used a combination of all
the resolutions. This was the first time I used this list and was
surprised how fast and accurate I got a repsonse.
Thanks
- Forwarded by Michael Mittentag/USA/DDS on 12/10/2001 08:52 AM -
> How can i get the number of the week from localtime function ?
- feed localtime with "january 04" in this year (for ISO 8601)
- find out when that week begins;
- find out the difference between today and that day;
- divide that by seven days (and add one).
Or, use a date module:
use Date::Tie
From: "nafiseh saberi" <[EMAIL PROTECTED]>
> hi dear.
> you can use...
> require "cgi-lib.pl";
PLEASE FORGET cgi-lib.pl USE CGI.pm !
> &ReadParse;
> $PASS=$in{"pass"};
>
> pass exists in web
> and PASS is a variable that you can use it in your
> program.
This will NOT read a session varia
On Mon, 10 Dec 2001, Brett W. McCoy wrote:
> > if I use the system call like this
> > system ("ping localhost > pinginfo");
> > But in linux this will keep on going how can I set up a time on that ?
>
> Use the -n option to give it a set number of times it pings:
>
> system("ping -n 20 localhsot
On Mon, 10 Dec 2001, Christo Rademeyer wrote:
> if I use the system call like this
> system ("ping localhost > pinginfo");
> But in linux this will keep on going how can I set up a time on that ?
Use the -n option to give it a set number of times it pings:
system("ping -n 20 localhsot > pinginf
hi dear.
you can use gmtime...it get many thing to you.
$sec,$min,$hour,$mday,$mon,$year,$wday,$yday) =
gmtime(time);
be success.
but why do youlike to use local time ??
thx.
Best regards. Nafiseh Saberi
www.ir
Greetings,
How can i get the number of the week from localtime function ?
Best regards,
Franck
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Check the -c option of ping (man ping).
hth,
Sudarsan
Christo Rademeyer wrote:
> Hi
> if I use the system call like this
> system ("ping localhost > pinginfo");
> But in linux this will keep on going how can I set up a time on that ?
> Thanx
> christo
>
> --
> To unsubscribe, e-mail: [EMAIL PRO
Hi
if I use the system call like this
system ("ping localhost > pinginfo");
But in linux this will keep on going how can I set up a time on that ?
Thanx
christo
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
64 matches
Mail list logo