This will not work as it will also forbid creating new files(according to the question
only sub-DIRS r not allowed) in that directory. There is no Unix-provided solution for
this. One can write a function, which can be called first in any perl code (related to
some task in that path) to ensure
Michael Fowler wrote:
> On Mon, Sep 02, 2002 at 03:56:22PM +0530, Ramprasad A Padmanabhan wrote:
>
>>Hi All,
>> I am writing an web application where multiple users may write into
>>the same file concurrently. Also there is a probability that there may
>>be an admin who has opened up the file
On Wed, 4 Sep 2002, Javeed SAR wrote:
> This will not allow me to had files ??
Please reply to the list.
If you are the owner of that directory, retain the write permission for
yourself and disable it for everyone else.
Is your question "users should be allowed to add files but not directo
yeah u r right.
-
Get a bigger mailbox -- choose a size that fits your needs.
On Wed, 4 Sep 2002, Javeed SAR wrote:
> Hi all,
>
> How should i avoid creating directories in a particular path?
> For Eg under DSP directory i should not allow any directory to be created..
>
Remove the write permission on this directory.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
Hi all,
How should i avoid creating directories in a particular path?
For Eg under DSP directory i should not allow any directory to be created..
Regards
Javeed
Thanks very much for the help!
what I was stumbling on was...
if File::Find give us directory/filename we still need to open up each file, and to do
this we use
open(FILE, $_)
rather than trying read the name of a file, in which case $_ would neve give us the
contents of that file
many thank
Dear Sir and Madam.
Please don't send me any mail.
Thank your!
_
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [
Pam Derks wrote:
>
> Hi,
>
> Newbie here...I'm trying to find the string "Take our survey" in all the files that
>match this pattern, traversing multiple directories. When I run it I get no
>filenames. I'm positive the string exists. Any ideas as to what I'm doing wrong.
>
> Thanks for any he
On Tue, Sep 03, 2002 at 04:33:37PM -0700, Pam Derks wrote:
[snip]
> #!/usr/bin/perl
> #process all files in directory www/htdocs
>
> use File::Find;
> @ARGV = qw(/dept/unxmkt/www/htdocs) unless @ARGV;
> find(\&find_it, @ARGV);
>
>sub find_it{
>foreach $_(@ARGV){
> wh
This is an interesting proposed solution. But as the poster pointed out
depends on whether they are *only* using vi, if that can be assured then
you might consider using the method by which vi does its own checking on
its own files. In other words check for a "..swp" or maybe a
"..sw*" file i
Hi,
Newbie here...I'm trying to find the string "Take our survey" in all the files that
match this pattern, traversing multiple directories. When I run it I get no filenames.
I'm positive the string exists. Any ideas as to what I'm doing wrong.
Thanks for any help, Pam
Here's what I've got..
that doesn't reveal what:
$Explanation = < ) ); #-- Alignment data
does. can you again provide some code above this line? it start to look like
a real syntax error to me unles the whole subroutine is really inside a
pod. what happen if you:
perl -c
david
Prachi Shah wrote:
> Here's what t
Here's what the main function looks likeit has more subroutines below,
but I guess this might be enough for you guys to look at.
I also realise that there is a right curly parentheses at the end which does
not have a starting left parentheses. So, maybe this code is full of syntax
errors.
John W. Krahn wrote:
>> change:
>>
>> @users = ;
>>
>> to:
>>
>> chop(@users = );
>
>
> You should use chomp unless you are stuck in Perl4.
>
agree. chomp is safer(and faster than chop).
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
the line by itself is a syntax error. could it actually be something inside
of a pod like:
=item
$Explanation = < ) );
=cut
that you are not aware of? anything between =item and =cut is ignored by
Perl.
or something like a here document as:
($Explanation =<);
if you provide more lines abo
Prachi Shah wrote:
>
> Hi!
Hello,
> I have this code written by someone and there's no documentation to it. I am
> trying to figure what and how it works. There is this line right at the
> beginning of the code that baffles me. Does someone have a clue as to what
> this means?
>
> $Explanation
David wrote:
>
> Darren Wanner wrote:
>
> > Simple add user script:
> >
> > #!/usr/bin/perl
> >
> > open(FILE,"users.log");
> > @users=;
> > foreach $users (@users) {
> > `useradd -g 201 -d /userhome/$users -m $users`;
> > }
> > print "done.\n";
>
> change:
>
> @users = ;
>
> to:
>
> chop(@u
In message <[EMAIL PROTECTED]>
Darren Wanner <[EMAIL PROTECTED]> wrote:
>
> I'm trying to write a simple script that takes a list of users from a file
> and creates a user account for them, using the useradd script. The system
> I'm doing this on is Solaris 8. When I run the script I
Darren Wanner wrote:
>
> I'm trying to write a simple script that takes a list of users from a file
> and creates a user account for them, using the useradd script. The system
> I'm doing this on is Solaris 8. When I run the script I get the following
> error. It seems as if it's not accepting
Darren Wanner wrote:
> Simple add user script:
>
> #!/usr/bin/perl
>
> open(FILE,"users.log");
> @users=;
> foreach $users (@users) {
> `useradd -g 201 -d /userhome/$users -m $users`;
> }
> print "done.\n";
change:
@users = ;
to:
chop(@users = );
and try again.
david
--
To unsubscribe,
Hi!
I have this code written by someone and there's no documentation to it. I am
trying to figure what and how it works. There is this line right at the
beginning of the code that baffles me. Does someone have a clue as to what
this means?
$Explanation = < ) );
thanks,
Prachi.
I'm trying to write a simple script that takes a list of users from a file
and creates a user account for them, using the useradd script. The system
I'm doing this on is Solaris 8. When I run the script I get the following
error. It seems as if it's not accepting the variable in the command
li
On Tue, 3 Sep 2002, David T-G wrote:
> % all im trying to do is run the shell command:
> %
> % convert -quality 40 image.jpg resampled_image.jpg
>
> Better yet, you should grab the PerlMagick module and just run the
> commands from within your perl script and forget the system call (or
> backti
James Edward Gray II <[EMAIL PROTECTED]> wrote:
> This what you mean?
> @one_line_per_index = ;
> $multiple_lines = join '', @one_line_per_index;
> On Tuesday, September 3, 2002, at 01:35 PM, Tim Musson wrote:
>> sub GetBodyFromFile {
>> my $file = $0;
>> open (INFO, $file);
>>
Hey Bob,
My MUA believes you used Internet Mail Service (5.5.2650.21)
to write the following on Tuesday, September 3, 2002 at 2:56:13 PM.
>>I need to read a file and put it in a $Variable (not @Array).
BS> { local $/; $body = }
Thanks all, this is what I was forgetting!
--
[EMA
On Mon, Sep 02, 2002 at 03:56:22PM +0530, Ramprasad A Padmanabhan wrote:
> Hi All,
> I am writing an web application where multiple users may write into
> the same file concurrently. Also there is a probability that there may
> be an admin who has opened up the file in 'vi' and editing the fil
> -Original Message-
> From: david [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: RE: cookies and baking in general :)
>
>
> Bob Showalter wrote:
>
> >> -Original Message-
> >> From: david [mailto:[EMAIL PROTECTED]]
> >>
Bob Showalter wrote:
>> -Original Message-
>> From: david [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, September 03, 2002 1:24 PM
>> To: [EMAIL PROTECTED]
>> Subject: Re: cookies and baking in general :)
>>
>>
>> there are
>> cookie blocking
>> software out there that sets between a use
> -Original Message-
> From: Tim Musson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 2:35 PM
> To: [EMAIL PROTECTED]
> Subject: How to get Multi-Line file into $var?
>
>
> hey Perl people!,
>
>Can't seem to get my brain to work this afternoon...
>
>I need to r
thnx to all for the feedback.
$! and $? is what I was looking for and anyothers which there aren't.
Now I am on a mission to find a bug in XML::Simple related to rsh, system
commands and lack of sanity.
> -Original Message-
> From: david [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, Septem
Tim Musson wrote:
>
> hey Perl people!,
Hello,
>Can't seem to get my brain to work this afternoon...
>
>I need to read a file and put it in a $Variable (not @Array).
>
> [snip]
>
> This next bit is my problem. I can use the $body in the bit below,
> but not the @body. Looks like if
backticks is simply an operator in Perl that tells Perl to run something and
capture whatever that external program sends to standout. backticks itself
doesn't set/unset/change/pupulate any variables(well except $!, $? etc when
Perl is having problem running your program and trying to tell you t
This what you mean?
@one_line_per_index = ;
$multiple_lines = join '', @one_line_per_index;
On Tuesday, September 3, 2002, at 01:35 PM, Tim Musson wrote:
> sub GetBodyFromFile {
> my $file = $0;
> open (INFO, $file);
> @body = ;
> close(INFO);
> $body="
> 123456
Hello Everyone,
I got a script that spawns off a few children. But for some reason
before the children are finished doing what they are suppose to do they
die.
code:
use POSIX "sys_wait_h";
my $child_limit = 1;
my $child_pids = 0;
$SIG{CHLD} = \&CHILD_COUNT;
FORK:
{
hey Perl people!,
Can't seem to get my brain to work this afternoon...
I need to read a file and put it in a $Variable (not @Array).
What I am doing is a bit of code to run a SMTP mail sender (yes, I
know Net::SMTP works great, but this is how the customer want's
it).
So I ha
the tricky part is the "admin who has opened up the file in 'vi' and editing
the file". this kind of manually open editing behavior is hard to track for
the locking module that you just mention. the following provides you with a
simple(not perfect at all and it's slow) method and it searches you
an invalid option is one that you don't expect the user to enter or
one that is actually not in a valid form? consider the following(foo.pl):
#!/usr/bin/perl -w
use strict;
use Getopt:Long;
$SIG{__WARN__} = sub { print "WARNING WARNING\n"; };
sub process{
print "BAD: ",shift,"\n";
}
my
> -Original Message-
> From: david [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 1:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: cookies and baking in general :)
>
>
> there are
> cookie blocking
> software out there that sets between a user's browser and
> your cgi sc
I am trying to parse a squid log file to let It management know where people
are browsing too. my plan block diagram goes a follows
1. open log
2. seperate by IP address , list only one at a time no repeats of the same
IP address
3. list only one instance of a visited site , per IP address
4
depends on the needs of your application. generally, don't rely on the user
to use your page in a certain order. instead assume that he/she will use
your page in random order. the problem of force user to use your
page in a certain order is not very reliable. a user can always have
multiple wi
On Sep 3, Nikola Janceski said:
>The point is a backtick execution. ie. my @output = `some command that spews
>output`;
>
>QUESTION: What are all the possible globally scoped variables that backticks
>can possible set/unset/change/populate?
As far as I can tell, $! and $? are the only ones I see
closures are a great idea to generate similar functions on the fly. one
thing you should keep in mind is that when Perl search for variable,
subroutine etc, it always search the lexical namespace before it search the
symble table. consider the following:
$h->{'process'}->{'image'} = 1;
$h->{'p
On Tuesday, September 3, 2002, at 08:26 , Andrew Metcalfe wrote:
[..]
> Once I understood what => and -> were doing, it all made perfect sense...
[..]
thanks for reminding those who have forgotten
that while "=>" may appear to be what in perl is ">="
{ greater than or equal } it is really a "thi
> -Original Message-
> From: Balint, Jess [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 12:58 PM
> To: '[EMAIL PROTECTED]'
> Subject: Text-Mode Module for perl?
>
>
> Hello all. I am looking for something similar to the curses/ncurses C
> library as a module for perl. An
Hello all. I am looking for something similar to the curses/ncurses C
library as a module for perl. Any suggestions, greatly appreciated. Thanks..
Jess
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I am trying to pin point some error I am getting with a module (from some
old post that one person responded to).
I have narrowed it down some point elsewhere in MY programming.
The point is a backtick execution. ie. my @output = `some command that spews
output`;
QUESTION: What are all the poss
Oh, I am happy with 5.6.1 ... Use it all over the place ... But ...
Threading ... Real, honest threading? That would be something
wonderful...
Any idea if there's a shared memory module for the threading? I believe
the problem I ran into last time I tried this was that most of the
modules we
Thanks everyone for the help.
Once I understood what => and -> were doing, it all made perfect sense...
I actually wasn't debugging, but enhancing a perl based open source app for
our specific needs.
Thanks,
_Am
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTE
I am a beginner, so list members -- correct me if I'm wrong here, but I
think that the mathematical symbols (<>=) will only work with variables
containing numbers. For strings, you have to use gt, lt, le, eq. Hope
this is helpful.
Shawn
On Wednesday, September 4, 2002, at 04:35 , Sudarshan Raghavan wrote:
> On Tue, 3 Sep 2002, Chad Kellerman wrote:
[..]
>> my $ssh;
>> eval {
>> alarm 10;
>> $ssh = Net::SSH::Perl->new($host_ip,
>> identity_files =>["$id_key
On Mon, 2 Sep 2002 11:21:07 -0700, [EMAIL PROTECTED] (Ebaad Ahmed)
wrote:
># ./loads.cgi
>Can't locate GD.pm in @INC (@INC contains:
>
>I can tell that it is looking for the GD.pm but since I have installed all
>the packages then why is it complaining about it or is there some thing else
>I need
on Tue, 03 Sep 2002 13:11:47 GMT, [EMAIL PROTECTED] (James Edward
Gray II) wrote:
> This is the easiest way, in my opinion. It'll work on files
> passes as command line arguments. Beware the replacing though,
> files will be modified in place and data may be lost!
>
> #!/usr/bin/perl -pi
The
On Tue, 3 Sep 2002, Chad Kellerman wrote:
> Hey guys,
>
> Having an issue with Net::SSH:Perl and eval.
>
> Is there another way to write this? Or am I just missing something?
>
> my $ssh;
> eval {
> alarm 10;
> $ssh = Net::SSH::Perl->new($
Jo --
...and then tux said...
%
% hey all, sorry if im asking a silly or stupid question, but i just CANT
% seem to find anything on google/in books on how to do this, its slowly
% make me go bald..
You need the camel book, then.
%
% all im trying to do is run the shell command:
%
% conver
Hey guys,
Having an issue with Net::SSH:Perl and eval.
Is there another way to write this? Or am I just missing something?
my $ssh;
eval {
alarm 10;
$ssh = Net::SSH::Perl->new($host_ip,
identity_files =>["$id_key_fn"
Jason, et al --
...and then Angerstein said...
%
% full 64Bit support
Also full threading, I hear, though I think that those two are the real
meat of the upgrade. When I asked this question recently it basically
boiled down to "if you're happy with 5.6.1 then just stick with it" and
that's wha
This is the easiest way, in my opinion. It'll work on files passes as
command line arguments. Beware the replacing though, files will be
modified in place and data may be lost!
#!/usr/bin/perl -pi
s/leftmargin="0".*bgcolor="#3c3939"//g;
s/bgcolor="\#5A5D4E"/class="topOfPic"/ig;
On Monday, S
Andrew Metcalfe wrote at Mon, 02 Sep 2002 20:28:43 +0200:
> I'm a MS and Java developer, trying to debug some perl code.
Perl is *very* different to Java.
Better start with a Perl tutorial.
Please look also first to the excellent answer of Jeff,
as I won't re-explain what Jeff already has done.
Ashutosh Jog wrote at Mon, 02 Sep 2002 17:46:25 +0200:
> Have you tried
>
> system (convert -quality 40 image.jpg resampled_image.jpg);
Looks like a quoting is forgotten :-)
system qw(convert -quality 40 image.jpg resampled_image.jpg);
^^
Cheerio,
Janek
--
To unsubscribe, e-mail:
The file generated by 'perlcc' does the same task as the perl file. In the program
where you are requesting the service, change the name from perl file(which was earlier
to 'perlcc') to the generated binary file.
-
Get a bigger mailbox -- choose a size that fi
Hi ALL.
How to run compiled program in cgi module???
I compile the program using: perlcc -o test test.pl
and copy to /cgi-bin and run instead ??
- My program requires a perl module from apache to run in cgi mode?, or the perlcc
build all libraries on compiled program?
thanx for help...
Pl
Tim Booher wrote:
>
> Hello, I am currently frustrated trying to do a simple find and replace
> on a file, but the three open options: Read, Write and Append don't seem
> to give me what I want. For example, Read, works on the finding, but
> nothing will replace. Write erases all the files and le
On Mon, 2 Sep 2002, Tim Booher wrote:
> Hello, I am currently frustrated trying to do a simple find and replace
> on a file, but the three open options: Read, Write and Append don't seem
> to give me what I want. For example, Read, works on the finding, but
> nothing will replace. Write erases al
My thought is this: that's just the way the filesystem works. You really
only have two options: you can create a temporary file or you can store the
contents of the file in memory. Then when you have finished changing the
file you can write the new file to the old file's place. It sounds at f
Hello, I am currently frustrated trying to do a simple find and replace
on a file, but the three open options: Read, Write and Append don't seem
to give me what I want. For example, Read, works on the finding, but
nothing will replace. Write erases all the files and leaves me with
blank files and
66 matches
Mail list logo