On 08 Jun 2001 17:17:46 +1000, [EMAIL PROTECTED] wrote:
> Hi Perl People,
>I'm creating a web interface to a linux server and was wondering if
>there are perl modules that can be used to change linux passwords?
>
> The idea is to be able to administrate a linux box without having
? How do i affect this type of result to my existing code
if a grade of a 90-100 = an A
and a grade of 80-90 = a B
and a grade of 70-80 = a C
and a grade of 60-70 = a D
and a grade of 0-60 = a F
I understand i am creating 2 more arrays but i need to get a range and assign it to a
Letter
On Sat, Jun 09, 2001 at 12:45:07AM -0700, SunDog wrote:
> The SYSTEM and EXEC commands will only work for scripts running on
> UNIX or unix like machines if you're doing this in Windoze ...
> do not expect this to work .. could just be a good time to upgrade
> to a Li
At 02:43 AM 6/10/2001 -0500, bdale16 wrote:
>? How do i affect this type of result to my existing code
>if a grade of a 90-100 = an A
>and a grade of 80-90 = a B
>and a grade of 70-80 = a C
>and a grade of 60-70 = a D
>and a grade of 0-60 = a F
>
>I understand i am creating 2 more arrays but
This post may be rejected by the [EMAIL PROTECTED] as has
happened to one or two previous posts. The message body on those read
"Our spam filter rejected this transaction."
The ISP I use may have been blocked. We'll see if this message goes...
Hi all!
Firstly, thanks to all those people who helped me with my command line
arguments problem. Special mention goes to Jeff and his "Poorgramming joke".
But unfortunately, I've run up against another problem :(
I recently did this:
print $ENV{USER}, "\n";
And i got "george" back
On Sun, 10 Jun 2001, George Petri wrote:
> But unfortunately, I've run up against another problem :(
>
> I recently did this:
>
> print $ENV{USER}, "\n";
>
> And i got "george" back as the response.
>
> Then I did this (in Bash, Linux-Mandrake 7.2):
>
> MYVARIABLE=astring
> perl
On Sun, 10 Jun 2001, George Petri wrote:
> Then I did this (in Bash, Linux-Mandrake 7.2):
>
> MYVARIABLE=astring
> perl -e 'print $ENV{MYVARIABLE}, "\n";'
>
> It spits out nothing...why doesn't PERL detect any of my environment
> variables? This is critical in some CGI programs that
On Sun, Jun 10, 2001 at 10:44:09PM +, George Petri wrote:
> Then I did this (in Bash, Linux-Mandrake 7.2):
>
> MYVARIABLE=astring
> perl -e 'print $ENV{MYVARIABLE}, "\n";'
I suspect you need to export MYVARIABLE.
MYVARIABLE=astring
export MYVARIABLE
or
export MYVA
On 10 Jun 2001, at 15:16, Markus Peter wrote:
> On Sun, 10 Jun 2001, George Petri wrote:
> > It spits out nothing...why doesn't PERL detect any of my environment
> > variables? This is critical in some CGI programs that I intend to write (but
>
> Well - because MYVARIABLE is not yet an environm
> ([EMAIL PROTECTED]) spew-ed forth:
> > I've not been able to come up with any reasonable CGI that would be
> > creating a path that the user has any control over; why would one want
> > to do that?
> What about things like document/filesystem management tools? Or
> (re)configuration tools? Sayin
On Sat, Jun 09, 2001 at 01:43:18PM +0800, bdale16 wrote:
> ? How do i affect this type of result to my existing code
> if a grade of a 90-100 = an A
> and a grade of 80-90 = a B
> and a grade of 70-80 = a C
> and a grade of 60-70 = a D
> and a grade of 0-60 = a F
You have the psuedo-code r
George -- Make sure to use 'export' on your env. variables when setting them in a
shell.
So this should work:
export MYVARIABLE=astring
on my Red Hat box this did the trick:
[mcauthorn@bubba mcauthorn]$ export MYVAR=testing
[mcauthorn@bubba mcauthorn]$ perl -e 'print "$ENV{MYVAR}\n"'
This works for me...
#!/usr/bin/perl -w
while (<>){
print if $_=~/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/;
}
Regards,
Matt
--- William <[EMAIL PROTECTED]> wrote:
> hi,
>
> i want to be able to read a text file and extract only the valid
> ip addresses. however, along with valid ip addres
Just installed Perl on a Linux box yesterday and I'm eager to get started...
Is there a shareware/freeware Perl development environment? (As in comments
are this color, constants are that color, a real-time debugger, etc?)
Is there a module/include/header that parses CGI input and sticks it into
On Sun, 10 Jun 2001, Burt Humburg wrote:
> Just installed Perl on a Linux box yesterday and I'm eager to get started...
>
> Is there a shareware/freeware Perl development environment? (As in comments
> are this color, constants are that color, a real-time debugger, etc?)
If you are using Linux,
On Sun, 10 Jun 2001, Burt Humburg wrote:
> Just installed Perl on a Linux box yesterday and I'm eager to get started...
>
> Is there a shareware/freeware Perl development environment? (As in comments
> are this color, constants are that color, a real-time debugger, etc?)
I suggest Emacs or Xemac
I always point new Linux folks to: http://linuxnewbie.org.
There you'll find board after board of useful stuff, dealing with almost anything
you can think of. Click on the "discussion" link near the top of the page and you're
off. As for editors on Linux, I use vim, which does sytax highlighting
Hey all,
I was wondering why the perl install has both the
./perl/lib and ./perl/site/lib folders? They both seem to have the
same type of things (modules, etc...). Why are there both, and why
would you choose to put a module you were writing in one or the
other?
--
[EMAIL PROTECTED]
Using Th
Unless I'm mistaken, I would have to say
perl/site/lib = Site/Arch/Machine Specific Modules
perl/lib = Default/Packaged Modules
~Jon
--- Tim Musson <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I was wondering why the perl install has both the
> ./perl/lib and ./perl/site/lib folders? They both s
Perl People,
I am the only one at my current contract that knows Perl (and I
can't for the life of me figure out why the others don't learn it
instead of asking me each time it is needed... ). This time, I
thought I would ask the list...
The network drives (P: for personal data, etc)
> Is there a shareware/freeware Perl development environment? (As in
comments
> are this color, constants are that color, a real-time debugger, etc?)
I use midnight commander.
Does syntax highlighting.
On a RH Linux install it starts with mc.
Some usefull keys:
ctrl-o : switch between 2 line
On Sun, 10 Jun 2001, Bruno Veldeman wrote:
> > Is there a shareware/freeware Perl development environment? (As in
> comments
> > are this color, constants are that color, a real-time debugger, etc?)
>
> I use midnight commander.
>
> Does syntax highlighting.
>
> On a RH Linux install it starts wi
For Linux/BSD there are quiet a number of editors that do syantax highlighting.
Perhaps the most common is emacs or xemacs (both free). It is also avilible
for Win32 at http://www.gnu.org/software/emacs/windows/ntemacs.html
For linux/BSD, you will most likely find it on your distributions home
I've gotten the following to work (after doing a Linux localedef command for
fi_FI - finnish) and am now trying to achieve some knowledge of how to do
manipulations/matchings using the utf8 pragma.
The locale test reads:
#!/usr/bin/perl -w
use POSIX;
use locale;
$loc = POSIX::setlocale( &POSIX
At 03:10 PM 6/10/2001 -0400, Tim Musson wrote:
>Anyway, the requirement is to move all files older
> than a specified age to another root folder while retaining the
> entire directory structure.
>
> For example:
> p: = d:\users\User1\WinNT\System32\notepad.exe
> We want to move it to
>
>
> What does mc use for its editor? It's probably using one of the editors
> that come with Linux.
>
>
No clue, it seems it has something like joe, vi or vim, but I am not sure.
:-{
I use it because it is quick for browsing trough directories.
I normaly open 3 to 5 tty's with mc in them so I
On Sun, 10 Jun 2001, Bruno Veldeman wrote:
> I normaly open 3 to 5 tty's with mc in them so I can cut and paste
> between the files with ctrl-insert and shift-insert. The sixth tty I
> use for running the scripts (and get blown away by endless errors and
> warnings) :-) This is the closest I got
Bruno Veldeman wrote:
> >
> > What does mc use for its editor? It's probably using one of the editors
> > that come with Linux.
> >
> >
>
> No clue, it seems it has something like joe, vi or vim, but I am not sure.
> :-{
>
afaik, on Linux, mc has it's own editor, called 'mcedit', which is invok
When I run the following code with the Warning flag I get the following
message:
Variable "%hash" will not stay shared
Here is my code:
#trying to sort a Hash by Value
use strict;
my @list = ('apple',12, 'peach', 2, 'pear', 45);
&function_one(@list);
sub function_one {
my %hash = @_;
On 10 Jun 2001, at 23:37, Charles Lu wrote:
>my @newhash = sort {$hash{$a} <=> $hash{$b}} keys %hash;
It's not quite an answer to your question, but I'm curious why you
nested the subroutine instead of just writing it like this?
--
Karen J. Cravens ([EMAIL PROTECTED])
On Sun, 10 Jun 2001, Charles Lu wrote:
> When I run the following code with the Warning flag I get the following
> message:
>
> Variable "%hash" will not stay shared
This can be a dangerous situation. Perl is complaining because
of the nested subroutine. The dangerous part is that it that t
with use strict and use warnings putting the hash outside function_one as a
lexical or global both seem to work. Even making the hash inside function_one
a global seems to generate a warning if use warning is in effect. so putting a
function inside another seems to be no different from have it ou
hya,
On Mon, 11 Jun 2001, Charles Lu wrote:
> > When I run the following code with the Warning flag I get the following
> > message:
> >
> > Variable "%hash" will not stay shared
> >
> > Here is my code:
> >
> > #trying to sort a Hash by Value
> > use strict;
my($var, @list, %hash);
sub fu
On Sun, 10 Jun 2001, Charles Lu wrote:
> Variable "%hash" will not stay shared
I forgot to mention a few little details.. so here is your example
code with the corrections to get rid of the unsharing problem.
use strict;
my @list = ('apple',12, 'peach', 2, 'pear', 45);
&function_one(@list);
35 matches
Mail list logo