Hi;
What is the Perl equivalent of "net user username \domain" if I am
on Linux or Mac?
None of our Linux or Mac machines are a member of the specific
domain in question.
Do have to obtain the name of the AD/LDAP server and obtain some
kind of credentials for me to inq
that.
Quick question: I have been using Select function in shell to present
menu to users. Do we have a select equivalent in perl?
Yes we do!
I uploaded a version to CPAN many years ago, which I (for one) use all
the time.
Nowadays the CPAN installation doesn't work on some systems, so I
Hi folks
I have been using shell script for my admin work and recently decided to use
perl fo all my automation. So proud I did that.
Quick question: I have been using Select function in shell to present
menu to users. Do we have a select equivalent in perl? Or if I have a list
of names
to present
menu to users. Do we have a select equivalent in perl? Or if I have a list
of names in an array what is the best way to present them in a menu and
prompt the user to select one from the list?
I use the print statement to present the list of items with a number, then
print a prompt
a select equivalent in perl? Or if I have a list
of names in an array what is the best way to present them in a menu and
prompt the user to select one from the list?
The task is very easy to implement using IO::Prompt:
=pod code
use IO::Prompt;
my @names = qw( foo bar baz qux );
my $selected_name
Hi Folks,
I need an help.I am trying to read the file contents line by
line and if there are any number in the word (like 1,2,...) then i hav to
replace that digit by its equivalent in terms of words.
Ex:if input is hi*5*go
Output has to be hi*five*go..This changes has
,
I need an help.I am trying to read the file contents line by
line and if there are any number in the word (like 1,2,...) then i hav to
replace that digit by its equivalent in terms of words.
Ex:if input is hi*5*go
Output has to be hi*five*go..This changes has to be reflected in original
Hi all,
We are in the process of changing UNIX and MS-DOS scripts into Perl, mostly
UNIX scripts and there are a lot of codes that uses the EOF and EOF pair.
Am just wanting to know if there are better alternative to what I've been
doing so far.
Example of these are as below:
Example 01:
UNIX
On 2/10/10 Wed Feb 10, 2010 3:07 PM, newbie01 perl
newbie01.p...@gmail.com scribbled:
Hi all,
We are in the process of changing UNIX and MS-DOS scripts into Perl, mostly
UNIX scripts and there are a lot of codes that uses the EOF and EOF pair.
Am just wanting to know if there are better
Hi Jim,
Thanks for your advise ...
Am currently having issues with using DBI and DBD and is constrained on
installing new DBI versions so at the moment my only option is to shell out.
If I can get a fix on using DBI/DBD where I do not need to supply username
and password, then I will check
On 2/10/10 Wed Feb 10, 2010 5:53 PM, newbie01 perl
newbie01.p...@gmail.com scribbled:
Hi Jim,
Thanks for your advise ...
Am currently having issues with using DBI and DBD and is constrained on
installing new DBI versions so at the moment my only option is to shell out.
If I can get a
On Fri, Oct 24, 2008 at 22:12, Kelly Jones [EMAIL PROTECTED] wrote:
How can I see all the local, global, etc Perl variables defined at a
given point in my program?
snip
Take a look at PadWalker*.
* http://search.cpan.org/dist/PadWalker/PadWalker.pm
--
Chas. Owens
wonkden.net
The most
How can I see all the local, global, etc Perl variables defined at a
given point in my program?
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
2008/10/25 Kelly Jones [EMAIL PROTECTED]:
How can I see all the local, global, etc Perl variables defined at a
given point in my program?
see this:
http://perl.plover.com/FAQs/Namespaces.html
--
Jeff Pang
http://home.arcor.de/pangj/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I've searched CPAN, but have not found an equivalent module such as
Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere out there?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I've searched CPAN, but have not found an equivalent module such as
Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere out there?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Have you tried the standard Net::SSH does it not work with cisco devices?
On Mon, Oct 6, 2008 at 1:22 PM, Paul [EMAIL PROTECTED] wrote:
I've searched CPAN, but have not found an equivalent module such as
Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere out there?
Thanks
On Sun, Sep 7, 2008 at 3:44 PM, Melroy [EMAIL PROTECTED] wrote:
Hi all,
Is there a perl equiavelnt of the unix time command to find out how
long
a given process takes to run?
google search revealed no help. The only thing I found was the times
command,
but I don't think it does what I want.
of code. Then, take the difference and convert the result
from seconds to whatever you want.
Ray
Melroy wrote:
Hi all,
I want to benchmark a bunch of running processes using Perl , but I
could not find any equivalent for the unic time coammnd in perl? Can
someone point to me
Hi all,
I want to benchmark a bunch of running processes using Perl , but I
could not find any equivalent for the unic time coammnd in perl? Can
someone point to me
if such a function exists in perl? The only command I found was
times,
but I don't know how to use it. doing a websearch did not help
Hi all,
Is there a perl equiavelnt of the unix time command to find out how
long
a given process takes to run?
google search revealed no help. The only thing I found was the times
command,
but I don't think it does what I want.
(Basically I want to find out how long a given process takes to run
On Sun, 2008-09-07 at 09:30 -0700, Melroy wrote:
Hi all,
I want to benchmark a bunch of running processes using Perl , but I
could not find any equivalent for the unic time coammnd in perl? Can
someone point to me
if such a function exists in perl? The only command I found was
times,
but I
2008/9/8 Melroy [EMAIL PROTECTED]:
Hi all,
I want to benchmark a bunch of running processes using Perl , but I
could not find any equivalent for the unic time coammnd in perl? Can
someone point to me
if such a function exists in perl?
use Benchmark::Timer;
http://search.cpan.org/~dcoppit
I'd like to apply a series of inline edits to a file in Perl.
With sed, I could use sed -f commandfile inputfile or in awk, awk -
f commandfile inputfile, however, I could not find an equivalent in
Perl. I'd prefer not to use sed or awk as they do not support inline
editing directly.
In Perl
Perl -p -i -e s/search/replace/extras; FILENAME
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 15:06
To: beginners@perl.org
Subject: Perl equivalent of sed -f or awk -f
I'd like to apply a series of inline edits to a file in Perl.
With sed
[EMAIL PROTECTED] wrote:
I'd like to apply a series of inline edits to a file in Perl.
With sed, I could use sed -f commandfile inputfile or in awk, awk -
f commandfile inputfile, however, I could not find an equivalent in
Perl.
perl commandfile inputfile
I'd prefer not to use sed or awk
On Sep 2, 10:49 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
[EMAIL PROTECTED] wrote:
I'd like to apply a series of inline edits to a file in Perl.
With sed, I could use sed -f commandfile inputfile or in awk, awk -
f commandfile inputfile, however, I could not find an equivalent in
Perl
On Tue, Aug 5, 2008 at 6:06 PM, Peter Scott [EMAIL PROTECTED] wrote:
On Tue, 05 Aug 2008 09:38:41 +0530, Amit Saxena wrote:
What's the DBI equivalent of Oraperl ora_titles function ?
I need it because I want to get the titles (column names) of a select
query
into an array without
On Tue, 05 Aug 2008 09:38:41 +0530, Amit Saxena wrote:
What's the DBI equivalent of Oraperl ora_titles function ?
I need it because I want to get the titles (column names) of a select query
into an array without fetching the row values from the database.
I believe you want the NAME
Hi all,
What's the DBI equivalent of Oraperl ora_titles function ?
I need it because I want to get the titles (column names) of a select query
into an array without fetching the row values from the database.
Thanks Regards,
Amit Saxena
Hi;
What is the perl equivalent of a #!/bin/bash -xv?
I'd like to have verbose (print each line prior to execution) and expand
each variable prior to execution while executing?
How do I run perl in debug mode non-interactively, dumping every variable
when it gets modified?
How do I get
On Thu, Mar 13, 2008 at 7:09 PM, Kenneth Wolcott
[EMAIL PROTECTED] wrote:
Hi;
What is the perl equivalent of a #!/bin/bash -xv?
I'd like to have verbose (print each line prior to execution) and expand
each variable prior to execution while executing?
How do I run perl in debug mode non
Kenneth == Kenneth Wolcott [EMAIL PROTECTED] writes:
Kenneth How do I get the answers to either or both of these questions using
Kenneth perldoc?
By searching the perlfaq. perldoc perldoc will tell you how to use
perldoc, and from there, you can get the searches.
--
Randal L. Schwartz -
Seems that I recall perl having a built in like awk's FNR that keeps
track of the current line number in each file. Zeros out on each new
file.
Like $. only goes to zero on each new file.
I know how to do that with code but wondered if perl already does it
thru some builtin.
--
To
perldoc - perlvar
$. is reset when the filehandle is closed, but not when an open
filehandle is reopened without an intervening close(). For more
details, see I/O Operators in perlop. Because never does an
explicit close, line numbers increase across ARGV files (but see
examples in eof).
You
Xavier Noria schreef:
Detecting whether something holds in an array is the job of grep:
my $numbers = grep /\A$RE{num}{real}\z/, @data;
next unless $numbers == @data;
Alternative:
die if grep !/\A$RE{num}{real}\z/, @data;
my $numbers = scalar @data;
--
Affijn, Ruud
Gewoon
, and $ allows an optional trailing newline.
When I want to match a complete string exactly, I tend to use \A and
\z because they convey that intention clearly.
If your code processes line by line and splits on whitespace, \A ...
\z is equivalent to ^ ... $.
In my case, I am checking an array
How can I detect this, I have been running some code for a few days to develop
some files and ran into the situation where I am getting the following data for
input:
14.95313 14.45312 0
14.95313 1.570813E-015 0
14.95313 -14.45313 0
-14.95313 -28.90625 0
-14.95313 -14.45313 0
-14.95313
On 7/18/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
How can I detect this, I have been running some code for a few days to
develop some files and ran into the situation where I am getting the
following data for input:
14.95313 14.45312 0
14.95313 1.570813E-015 0
14.95313 -14.45313 0
-14.95313
Joseph L. Casale wrote:
How can I detect this, I have been running some code for a few days to develop
some files and ran into the situation where I am getting the following data for
input:
14.95313 14.45312 0
14.95313 1.570813E-015 0
14.95313 -14.45313 0
-14.95313 -28.90625 0
-14.95313
El Jul 18, 2007, a las 11:19 PM, Joseph L. Casale escribió:
How can I detect this, I have been running some code for a few days
to develop some files and ran into the situation where I am getting
the following data for input:
14.95313 14.45312 0
14.95313 1.570813E-015 0
14.95313 -14.45313
Notation to decimal equivalent
El Jul 18, 2007, a las 11:19 PM, Joseph L. Casale escribió:
How can I detect this, I have been running some code for a few days
to develop some files and ran into the situation where I am getting
the following data for input:
14.95313 14.45312 0
14.95313
On 7/18/07, Chas Owens [EMAIL PROTECTED] wrote:
On 7/18/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
How can I detect this, I have been running some code for a few days to
develop some files and ran into the situation where I am getting the
following data for input:
14.95313 14.45312 0
On 7/18/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
Interesting,
I see from your regexp you use a \A and \z, from Perldoc this means:
\A Match only at beginning of string
\z Match only at end of string
Is foo10bar valid? /^$RE{num}{real}$/ says no, but /$RE{num}{real}/
says yes.
Subject: Re: Convert Scientific Notation to decimal equivalent
On 7/18/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
Interesting,
I see from your regexp you use a \A and \z, from Perldoc this means:
\A Match only at beginning of string
\z Match only at end of string
Is foo10bar valid
On 7/18/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
Chas,
Sorry but I am not clear on what you mean by reduce? Do you mean
remove all non numbers from the array?
snip
Sort of, the code doesn't modify the original array, it creates a new
array with only the values that are numbers.
--
To
Hi,
I would like to create module of common sub routines and corresponding
global variables. I'm trying to use use and/or require but it
looks like I have to do extra coding to make variables defined in my
module file to be accessible to the .pl files that are using the
module file. Can someone
On 7/6/07, Ray [EMAIL PROTECTED] wrote:
I would like to create module of common sub routines and
corresponding global variables.
That's how most modules start; you're on the right track.
I'm trying to use use and/or require but it
looks like I have to do extra coding to make variables
Is there a perl equivalent to PHP variables $_POST and $_GET?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Jun 10, 2007, at 9:18 PM, On Ali wrote:
Is there a perl equivalent to PHP variables $_POST and $_GET?
Perl is a general-purpose programming language and does not have web
stuff builtin. To do web programming you need to pick some library/
framework like CGI.pm or Catalyst for example
- Original Message
From: On Ali [EMAIL PROTECTED]
Is there a perl equivalent to PHP variables $_POST and $_GET?
It would be easy to create, but what you really want is the CGI module:
#!/usr/bin/perl
use strict;
use warnings;
use CGI ':standard';
my $id= param('id
.
On Jun 10, 2007, at 3:18 PM, On Ali wrote:
Is there a perl equivalent to PHP variables $_POST and $_GET?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
I am having issues using File::Basename via cygwin perl. Is there a
workaround for that?
On 4/26/07, Xavier Noria [EMAIL PROTECTED] wrote:
On Apr 26, 2007, at 2:34 AM, Nishi wrote:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path
The issue is when i use cygwin Perl.
On 4/27/07, Chas Owens [EMAIL PROTECTED] wrote:
On 4/27/07, Nishi [EMAIL PROTECTED] wrote:
I am having issues using File::Basename via cygwin perl. Is there a
workaround for that?
Are you using cygwin's Perl or Activestate's Perl?
On 4/27/07, Nishi [EMAIL PROTECTED] wrote:
The issue is when i use cygwin Perl.
And the specific issue is what? I have just installed cygwin on an XP
box and wrote this script:
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
for my $path (qw{c:\foo\bar\baz.txt
This is what i see
c:\foo\bar\baz.txt - c:\foo\bar\baz.txt
/cygdrive/c/foo/bar/baz.txt - baz.txt
which is different from your output.
On 4/27/07, Chas Owens [EMAIL PROTECTED] wrote:
On 4/27/07, Nishi [EMAIL PROTECTED] wrote:
The issue is when i use cygwin Perl.
And the specific issue
So, I see the below output (that is diff than yours) when i run from cygwin.
If I run from the cmd prompt, I see the same output as yours.
On 4/27/07, Nishi [EMAIL PROTECTED] wrote:
This is what i see
c:\foo\bar\baz.txt - c:\foo\bar\baz.txt
/cygdrive/c/foo/bar/baz.txt - baz.txt
which is
So, calling the perl script explicitly as in
%ACTIVESTATEPERL%\bin\perl.exe
solves my issue in the cygwin environment.
On 4/27/07, Nishi [EMAIL PROTECTED] wrote:
So, I see the below output (that is diff than yours) when i run from
cygwin.
If I run from the cmd prompt, I see the same output
On 4/27/07, Nishi [EMAIL PROTECTED] wrote:
So, calling the perl script explicitly as in
%ACTIVESTATEPERL%\bin\perl.exe
solves my issue in the cygwin environment.
snip
I think there is some confusion here. You cannot be running
%ACTIVESTATEPERL%\bin\perl.exe from the cygwin environment as
On 4/27/07, Chas Owens [EMAIL PROTECTED] wrote:
On 4/27/07, Nishi [EMAIL PROTECTED] wrote:
So, calling the perl script explicitly as in
%ACTIVESTATEPERL%\bin\perl.exe
solves my issue in the cygwin environment.
snip
I think there is some confusion here. You cannot be running
I thing that I forgot to mention here is that I am calling the perl commands
within a batch script. So I pass ACTIVESTATEPERL to the perl within the
batch script and the bat file is run within the cygwin environment.
Thanks, Nishi.
On 4/27/07, Chas Owens [EMAIL PROTECTED] wrote:
On 4/27/07,
On Apr 26, 2007, at 2:34 AM, Nishi wrote:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in
perl?
File::Basename is a standard module, why you don't want to use it?
-- fxn
--
To unsubscribe, e-mail
Hi:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?
Would this work --
my $fileName=$path =~ /.*\/(.+)$/;
Thanks!
Nishi wrote:
Hi:
Hello,
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?
Would this work --
my $fileName=$path =~ /.*\/(.+)$/;
Assuming that your file system uses / as the path separator:
( my
Nishi wrote:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?
Would this work --
my $fileName=$path =~ /.*\/(.+)$/;
Why don't you try it?!
It wouldn't work because $fileName would end up
On 4/25/07, John W. Krahn [EMAIL PROTECTED] wrote:
Nishi wrote:
Hi:
Hello,
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?
Would this work --
my $fileName=$path =~ /.*\/(.+)$/;
Assuming
On 4/25/07, Nishi [EMAIL PROTECTED] wrote:
Hi:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?
Would this work --
my $fileName=$path =~ /.*\/(.+)$/;
Thanks!
There are many options, but none
Rob:
On 4/25/07, Rob Dixon [EMAIL PROTECTED] wrote:
Nishi wrote:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?
Would this work --
my $fileName=$path =~ /.*\/(.+)$/;
Why don't you try
my ($name) = $path =~ m|([^/]+)$|;
Shouldn't that be a =~ s|([^/]+)$|; not m?
On 4/26/07, Nishi [EMAIL PROTECTED] wrote:
Rob:
On 4/25/07, Rob Dixon [EMAIL PROTECTED] wrote:
Nishi wrote:
What is the equivalent of basename? Ie if I dont want to use basename
package to get
On 4/26/07, Nishi [EMAIL PROTECTED] wrote:
Rob:
On 4/25/07, Rob Dixon [EMAIL PROTECTED] wrote:
Nishi wrote:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in perl?
Would this work --
my
On 04/25/2007 11:59 PM, Nishi wrote:
On 4/25/07, Rob Dixon [EMAIL PROTECTED] wrote:
[...]
my ($name) = $path =~ m|([^/]+)$|;
I tried it, but somehow doesnt work for me, printing $name returns me the
entire string such as C:\temp\abc\abc.txt and not abc.txt.
Am I missing something?
hello,
Good questions.
I'm trying to use cmd line perl -e to do some fairly basic sed-style
find/replace.
Why don't you just use sed for that, if you're not doing the main
program in Perl? Maybe I'm misunderstanding you, but it sounds like
you're saying that you're writing shell scripts in
On 3/22/07, Alan Campbell [EMAIL PROTECTED] wrote:
true, but I'm tweaking the orig array in-place. So how to modify a given
element if I dont have some index?
With foreach, you don't need an index. The control variable of a
foreach isn't a copy of the array element; it *is* the element of
On 3/22/07, Alan Campbell [EMAIL PROTECTED] wrote:
sounds like advice is to not bother w/ perl -e. Seems a pity. Looked like a
perfect job for perl -e but perhaps its pushing it a bit.
I think the advice is not so much not to use perl -e, but rather that
you should be using Perl for the
hello folks,
I'm trying to use cmd line perl -e to do some fairly basic sed-style
find/replace. Was able to get first few things working but stumbled when I
wanted to do the following
- given an i/p (piped o/p from a previous perl -e cmd on DOS) of...
dtor_list.obj:
newnothrow.obj:
On 3/21/07, Alan Campbell [EMAIL PROTECTED] wrote:
I'm trying to use cmd line perl -e to do some fairly basic sed-style
find/replace.
Why don't you just use sed for that, if you're not doing the main
program in Perl? Maybe I'm misunderstanding you, but it sounds like
you're saying that
Very close! I used PHP::Serialization as Data::Dumper generated the
serialized object in a different format that PHP cannot read directly.
Now it works perfectly, thank you so much!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Are you trying to dump the data from perl and then read it
in php. ?
Yes. And I followed the example in Robert Boone's reply and now it works.
Thanks to everyone. Problem solved.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
I've translated the following PHP snippet:
$data = array();
$num = 0;
$data[$num]['title'] = 'Name';
$data[$num]['data'] = 'Randall';
$num++;
$data[$num]['title'] = 'Email';
$data[$num]['data'] = '[EMAIL PROTECTED]';
$num++;
As this Perl:
my @data;
my $num = 0;
$data[$num]['title']
On Thursday 01 March 2007 06:52, Randall wrote:
I've translated the following PHP snippet:
$data = array();
$num = 0;
$data[$num]['title'] = 'Name';
$data[$num]['data'] = 'Randall';
$num++;
As this Perl:
my @data;
my $num = 0;
$data[$num]['title'] = 'Name';
$data[$num]['data']
you'll need to write both PHP arrays as hashes in Perl
Thanks for the help, but it didn't work at all :-( nothing could be read
from the PHP side.
Any ideas?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Mar 1, 2007, at 10:51 AM, Traeder, Philipp wrote:
On Thursday 01 March 2007 06:52, Randall wrote:
I've translated the following PHP snippet:
$data = array();
$num = 0;
$data[$num]['title'] = 'Name';
$data[$num]['data'] = 'Randall';
$num++;
As this Perl:
my @data;
my $num = 0;
Hello ,
Are you trying to dump the data from perl and then read it
in php. ?
Madan
Randall wrote:
you'll need to write both PHP arrays as hashes in Perl
Thanks for the help, but it didn't work at all :-( nothing could be
read from the PHP side.
Any ideas?
--
To
Hi all,
Is there some type of equivalent to PHP's __FUNCTION__ magical constant
in Perl, with which you can get the current function's name within the
function's body?
The list of perl predefined variables from Larry Wall's book does
provide a __FILE__ constant, but apparently
--- Bram Kuijper [EMAIL PROTECTED] wrote:
Hi all,
Is there some type of equivalent to PHP's __FUNCTION__ magical
constant
in Perl, with which you can get the current function's name within
the
function's body?
The list of perl predefined variables from Larry Wall's book does
--- Kelly Jones [EMAIL PROTECTED] wrote:
Inside a subroutine, I want to use this hash:
%hash = (apple = red, pear = green, [EMAIL PROTECTED] =
yellow);
to set my($apple)=red, my($pear)=green, my($lemon)=yellow
[getting rid of the junk '@' and '!' chars in the key]
As noted, you
Inside a subroutine, I want to use this hash:
%hash = (apple = red, pear = green, [EMAIL PROTECTED] = yellow);
to set my($apple)=red, my($pear)=green, my($lemon)=yellow
[getting rid of the junk '@' and '!' chars in the key]
This is approximately what PHP's extract() does. This almost works:
Kelly Jones wrote:
Inside a subroutine, I want to use this hash:
%hash = (apple = red, pear = green, [EMAIL PROTECTED] =
yellow);
So just use the hash.
to set my($apple)=red, my($pear)=green, my($lemon)=yellow
[getting rid of the junk '@' and '!' chars in the key]
Just use the hash.
Kelly == Kelly Jones [EMAIL PROTECTED] writes:
Kelly Inside a subroutine, I want to use this hash:
Kelly %hash = (apple = red, pear = green, [EMAIL PROTECTED] =
yellow);
Kelly to set my($apple)=red, my($pear)=green, my($lemon)=yellow
Kelly [getting rid of the junk '@' and '!' chars in the key]
Does Perl have the equivalent of ps in Unix? I've
looked in my Programming Perl book, and I could only
find getpgrp, which does the opposit of what I want to
do. Here is a schematic of what I want to accomplish:
1) Search ps aux and locate process PROC.
2) Get PROC's PID.
3) Use the PID to kill
On Sun, 16 Oct 2005 22:14:05 +0800, Christopher Spears
[EMAIL PROTECTED] wrote:
Does Perl have the equivalent of ps in Unix?
Check out Proc::ProcessTable module
They have nice API for it.
or can you try this?
perl -e'print `ps --no-header -p$$ -osz`'
This is just an example snippet
Christopher Spears wrote:
Does Perl have the equivalent of ps in Unix?
No.
I've looked in my Programming Perl book, and I could only
find getpgrp, which does the opposit of what I want to
do. Here is a schematic of what I want to accomplish:
1) Search ps aux and locate process PROC.
2
Hi. I need to grab regex matches from a string in
perl. The string is an enum data type in Mysql. i.e.
enum('Berks','Carbon','Lehigh','Montgomery')
So basically I need a match on alphabetic chars
between single quotes. No problem. But I'd like to
be able to grab each match and store it in an
Frank Geueke [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi. I need to grab regex matches from a string in
perl. The string is an enum data type in Mysql. i.e.
enum('Berks','Carbon','Lehigh','Montgomery')
So basically I need a match on alphabetic chars
between single quotes.
Hi Todd,
I'm completely new to perl. I'm have to work in biology using perl,
postgresql (as database) and clustalw or multalin (as the alignment
tool). I'm stating my problem briefly:
In the postgresql db the data is clustered using complete linkage
clustering. I've to connect to that db, fetch
I would like to include a PERL file within an html or asp file. How do I do
that? I'm working on a Windows server.
--
Shelly Brown
On Tue, 27 Sep 2005, Shelly Brown wrote:
I would like to include a PERL file within an html or asp file. How do I do
that? I'm working on a Windows server.
You're looking for a templating framework. Perl offers several,
including:
Template Toolkit (TT)
HTML::Template
HTML::Mason (or
I would like to display the daily calendar information from a perl script:
http://webapps.sbuniv.edu/daycal/ within an html page so it looks like this:
http://www.sbuniv.edu/. Right now I have to manually enter the calendar
information. I would like for it to be dynamic. Make sense?
On 9/27/05,
Please bottom post...
Shelly Brown wrote:
I would like to display the daily calendar information from a perl script:
http://webapps.sbuniv.edu/daycal/ within an html page so it looks like this:
http://www.sbuniv.edu/. Right now I have to manually enter the calendar
information. I would like
has an equivalent to SSI, but iframe will work
anywhere.
--
Chris Devers
$í¡^t[ê(B
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
1 - 100 of 194 matches
Mail list logo