If you are using activestate try
ppm install
If you are using a different flavor try
perl -MCPAN -e "install "
Cheers,
Kristina
I wanted to get the additional modules, so I downloaded the stable.zip
onto
my NT machine and unzipped it, but I haven't been able to get it to
recogni
On Fri, 30 Aug 2002, Ramprasad A Padmanabhan wrote:
> Hi All,
>I have been using perl on linux for quiet some time now and I have
> found that Perl does not work the same in windows
>
>eg. To get all the unique elements of an array in linux I use a
> simple one liner
>
>@unique =
>eg. To get all the unique elements of an array in linux I use a
> simple one liner
>
>@unique = grep{!/$seen{$_}++/} @all_elements;
>
The above expression did not work for me,
I could not even found out how this should work. So I created a small file
with...
@all_elements = qw(hello al
use $a{ur_key}->[Index]
-
Get a bigger mailbox -- choose a size that fits your needs.
Hi All,
I have been using perl on linux for quiet some time now and I have
found that Perl does not work the same in windows
eg. To get all the unique elements of an array in linux I use a
simple one liner
@unique = grep{!/$seen{$_}++/} @all_elements;
But this does not even pass sy
On Aug 29, [EMAIL PROTECTED] said:
>foreach my $MyKey (sort { $a->[1]<=>$b->[1] } map{[$_,$h{$_}[2]]} keys %h) {
> printf "%-s -> %-s\n", $MyKey->[0], $MyKey->[1];
>}
You made that extra-difficult. The sorting field is already given to us
in the hash, so it needn't be manufactured.
sort {
On Apr 25, Michal Weinfurtner said:
>I have some data in hash of arrays and i need a print all of entries of
>that hash sorted by 2-nd index of arrays.
sort { $hash{$a}[2] <=> $hash{$b}[2] } keys %hash
returns the keys in the proper order. Change '<=>' to 'cmp' if you're
dealing with strings
Drieux wrote:
>
> a) use DB_FILE; is not required
> or were you being polite about it and vectoring
> back to the traditional and meant to imply reseting
> the cache size, etc, etc, etc
no, it's the result of a bad copy/paste. 'use DB_FILE' is not required in
this case.
>
> b) there is t
Robin Norwood wrote:
> "Gregg O'Donnell" <[EMAIL PROTECTED]> writes:
>
>> Hey - I'm receciving syntax and global package errors in lines 540-550 of
>> this script, which is running on WinNT. One error I receive is for not
>> defining my hash "%counties" which is, in fact, defined. So, I'm baffle
On Thursday, August 29, 2002, at 02:32 , david wrote:
[..]
> from Brian's code, it seems to me that he's running a windows machine so
> the
> getpw* stuff you refers to might not be available for him. again, i seldom
> develop anything in windows, so i can't be sure.
[..]
given that I do not ha
in line 64, you have:
> my %counties = ( #-- line 64
in line 543, you have:
> if ( ! {$counties}) { #-- line 543
in line 64, you declare a %counties hash variable.
in line 543, you are trying to access the $counties scalar variable which
do not exist.
remember in Perl that %counties and $coun
"Gregg O'Donnell" <[EMAIL PROTECTED]> writes:
> Hey - I'm receciving syntax and global package errors in lines 540-550 of this
>script, which is running on WinNT. One error I receive is for not defining my hash
>"%counties" which is, in fact, defined. So, I'm baffled and stuck. Any insight is
Hey - I'm receciving syntax and global package errors in lines 540-550 of this script, which is running on WinNT. One error I receive is for not defining my hash "%counties" which is, in fact, defined. So, I'm baffled and stuck. Any insight is greatly appreciated!!
GreggDo You Yahoo!?
Yahoo! Financ
from Brian's code, it seems to me that he's running a windows machine so the
getpw* stuff you refers to might not be available for him. again, i seldom
develop anything in windows, so i can't be sure. if you are worry about
that someone will manually open the config(text base) file, you might w
On Thursday, August 29, 2002, at 11:44 , david wrote:
[..]
>
> $dsn =
> $usr =
> $psw =
>
> my $db = new Win32::ODBC("fileDSN=$dsn; uid=$usr; psw=$psw");
>
> that should avoid the horrifying "listing" effect...
my compliments - there is the part about the uid and psw
that you could get with
on Thu, 29 Aug 2002 20:40:19 GMT, David Wagner wrote:
> my %h = ();
>
> $h {"1"} = [ "some string","other string",3 ] ;
> $h {"2"} = [ "some string","other string",2 ] ;
> $h {"3"} = [ "some string","other string",1 ] ;
>
> foreach my $MyKey (sort { $a->[1]<=>$b->[1] } map{[$_,$h{$_}[2]]}
> key
I changed your hash to h, so no conflict with sort values:
my %h = ();
$h {"1"} = [ "some string","other string",3 ] ;
$h {"2"} = [ "some string","other string",2 ] ;
$h {"3"} = [ "some string","other string",1 ] ;
foreach my $MyKey (sort { $a->[1]<=>$b->[1] } map{[$_,$h{$_}[2]]} keys %
Hi all ,
I have some data in hash of arrays and i need a print all of entries of
that hash sorted by 2-nd index of arrays.
Example:
$a {"1"} = [ "some string","other string","some number" ] ;
$a {"2"} = [ "some string","other string","some number" ] ;
$a {"3"} = [ "some string","other string"
First off thanks a bunch to Jeff for giving me that nice solution
to my "Constant Question" in yesterdays thread. I even sorta
understand why it worked:) Todays problem is to do with Tk.
How does one change the Tk color scheme globally for the
app? By this I mean is there a way of not having to sp
i am not a Windos guy and i am limited on what i know about ODBC. but why
not put your id and password in a config file so that your connect
statement will look like:
$dsn =
$usr =
$psw =
my $db = new Win32::ODBC("fileDSN=$dsn; uid=$usr; psw=$psw");
that should avoid the horrifying "listin
I asked earlier about a way to hide my password in the script, when calling
an SQL connection with a line like:
my($db) = new Win32::ODBC("fileDSN=myodbc.dsn; uid=myID; pwd=mysecret");
No answers, so let me ask another way: what steps should we take to keep
our scripts and embedded passwords
perldoc -f unpack
perldoc -f pack
> -Original Message-
> From: Bridget Benson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 29, 2002 12:46 PM
> To: [EMAIL PROTECTED]
> Subject: Extracting bits from a string of bits
>
>
> I am trying to grab selections of an ip packet stored in a
On Thu, Aug 29, 2002 at 06:47:26AM -0700, drieux wrote:
>
> ah! I see! you really are in the
>
> have code, the rest is temporary data files
I'm not sure I catch your drift here. Did a line get dropped from the
email?
>
> sorry for not quite catching your drift the first time.
>
> just
I am trying to grab selections of an ip packet stored in a string scalar.
I know if you have a string of characters, you can change the string
into an array of characters and then reference each character in the
array. Can you do something similar with a string of bits?
--
--
To unsubscribe
It should be located in %systemroot%\system32. If cmd.exe is not in your
path, then it sounds like your path may be too long. You might want to look
at it and see if there is anything you can get rid of, i.e. old programs
that you no longer use, and make sure that %systemroot% and
%systemroot%\
Hi,
> Note: questions of this nature you might want to send to
> [EMAIL PROTECTED] as that is a list specifically about cgi, though
> in most cases the beginners list will be able to help you too.
Thanks I will check it out >(more below)>
> Vargas Media wrote:
> > Hi,
> > I have been studying wit
Brad Fike <[EMAIL PROTECTED]> writes:
> I get the following error when I try to get documentation about a module or
> function.
>
> Can't spawn "cmd.exe": No such file or directory at C:\Perl\bin/perldoc.bat
> line 395.
It looks like the cmd.exe program isn't in your path - IIRC cmd.exe is
the
On Wednesday, August 28, 2002, at 07:52 , Erik Price wrote:
> Folks,
>
> I've used Perl here and there (on my OS X box) for basic stuff, but I
> haven't really played with modules. I feel like I'm really missing out
> on something cool here. Where do modules get stored by default in Darwin?
.--[ Mark Martin wrote (2002/08/29 at 14:54:30) ]--
|
| I'm concious that this might be a Linux problem but maybe someone on the
| list has had the same issue and solved it.
|
| I copied out below one of the simplest functions from a perl script that I
| need to schedule ever
> -Original Message-
> From: Mark Martin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 29, 2002 10:55 AM
> To: [EMAIL PROTECTED]
> Subject: DBI script won't run as cron job
>
>
> I'm concious that this might be a Linux problem but maybe
> someone on the
> list has had the same iss
I'm concious that this might be a Linux problem but maybe someone on the
list has had the same issue and solved it.
I copied out below one of the simplest functions from a perl script that I
need to schedule every day. When I run it interactively the table truncates
fine and I get all the print s
On Wed, 28 Aug 2002 11:46:05 -0700, [EMAIL PROTECTED] (David) wrote:
>Philip Montgomery wrote:
>> I am trying to figure out how to run process concurrently from Perl. I
>> want the parent to spawn off the children and wait until they are complete
>> to continue. I can get the child processes to
On Tuesday, December 4, 1956, at 07:56 , Paul Tremblay wrote:
[..]
> Okay, I'm getting closer to finishing the d**n beast of a script, so I
> need to think about how to distribute it. This script will be a
> command line utility. Right now it has no switches:
>
> rtf2xml
>
> I want to make it ea
David,
> for ($x;$x<4;$x++) {
> if ($pid=fork) {
> } else {
>system "mkdir dir$x";
> for ($i=1;$i<250;$i++) {
> open3(OUTPUT, INPUT, ERRORS, cd dir$x;make clean; make all);
> log files>
Basically, I want the fork to fork of 4 children. Each chiled I want
mrtlc wrote:
>I want to pull some data down from a Teradata database to a Win2k/NT server.
>I use DBI or Win32::ODBC, a system DSN (teradata1) is created.
>
>use DBI;
>use DBD::ODBC;
>my $dbh = DBI->connect("DBI:ODBC:teradata1", "uname", "moo");
>...
>
>or
>
>use Win32::ODBC;
>$data = new Win32::
Since we are on the topic...
I wanted to get the additional modules, so I downloaded the stable.zip onto
my NT machine and unzipped it, but I haven't been able to get it to
recognize any perl scripts. Did I miss a step?
-Sarah
-Original Message-
From: Nigel Peck [mailto:[EMAIL PROTECT
As you're a newbie, I thought I'd mention that you don't need to compile
your Perl code, it's done for you by the interpreter before being run.
The interpreter for Win2k is at http://www.activestate.com/
You probably already know but just in case...
Nigel
>>> "Michael Edwards" <[EMAIL PROTECTE
> I am having trouble using the Net::RawIP::dump function.
>
> I keep getting the error Bad filehandle for line 4 in this code.
> What is wrong with $fh?
>
> $p = open_offline($filename);
> $fh = dump_open($p, "file");
> $packet = next($p, \%hdr);
> dump($fh, \%hdr, $packet);
Can you post the r
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address)
There are no real Perl compilers, but there are two main programs out there
for creating executables out of your code. The first, which I use, is
PerlApp from ActiveState. It works very well, but as far as I know must be
purchased as part of the Perl Dev Kit. The second is Perl2exe, and I can'
I want to pull some data down from a Teradata database to a Win2k/NT server.
I use DBI or Win32::ODBC, a system DSN (teradata1) is created.
use DBI;
use DBD::ODBC;
my $dbh = DBI->connect("DBI:ODBC:teradata1", "uname", "moo");
...
or
use Win32::ODBC;
$data = new Win32::ODBC("DSN = teradata1; UID
I'm a sorta newbie to PERL and i was wondering if therte are any good PERL
compilers. Back in June I started to experiment with PERL but it takes a
long time to write. I have a Win 2000 PC.
Cheers
Mikes
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
42 matches
Mail list logo