fault, and the default perl that comes with AIX has very few modules.
This can cause issues if you try to build the bigger or more conplex
modules such as DBI.
-pete
-Original Message-
From: rjc [mailto:r...@linuxstuff.pl]
Sent: Monday, March 18, 2013 12:09 PM
To: beginners@per
my brain this morning is blocked on this one
I have a file something like
cpu01 value value value
cpu02 value value value
cpu03 value value value
...
cpu01 value value value
cpu02 value value value
cpu03 value value value
...
cpu01 value value value
cpu02 value value value
cpu03 value va
help on my next steps would be very much appreciated!
Pete
password in a configuration
file (and use something like Config::General to load it) which is only
readable by a secured user. You can then setuid [1] the script to
execute as that user - however, take note of any security issues this
might infer.
Cheers,
Pete
[1] http://en.wikipedia.org/wiki
I imagine there are going to be many recommendations - and there are
always new, "better" modules coming out for this sort of thing. However,
I'll kick things off to say I've used MIME::Lite [1] for a long time and
it has always done everything I've needed.
way?
The Modern Perl suggestion when dealing with dates and times is to use
DateTime. It is well tested and should handle edge cases you may not
have considered. After all, what do you do when you want to round up
from 2011-12-24 23:58:00?
You can use Math::Round to do the rounding for you.
Ch
. You need to send the header in all cases. Try changing your if
block to:
if ( $evalue == 3 ) {
my $cookie = $cgi->cookie(CGISESSID => $session->id);
print $cgi->header( -cookie=>$cookie );
deploy_page();
}
else {
print $cgi->header;
}
Pete
The $cgi-&g
ader without the cookie
depending on the behaviour you want.
Cheers,
Pete
On 04/05/11 14:23, Agnello George wrote:
Hi
In my script i am using template toolkit. I am trying to set the
cookie in my browser but all that it does is it prints the following
output on my broswer :
Set-C
Hi, I was wondering if someone could point me in the right direction. In
my example below, I have a handler that will parse a contact's name into
another xml node. However, the problem is that when I do this, the
parent node loses an attribute that I am trying to set. Here is example
output:
[EM
x27;$command') is not the same as with double
quotes, i.e. system("$command").
With single quotes the $command won't be interpreted. You need double
quotes in this case in order for the date command to be successfully
executed.
Pete
On Nov 10, 2005, at 9:32 AM, <[EMAIL
vice, personal anecdotes, or online references, pro or con,
would be greatly appreciated. Thanks.
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
)/;
print "$1 $2 $3 $4 $5 $6 $7 $8\n";
$ieeedouble =~ /(.)(.{11})(.{52})/;
print "IEEEDBL SIGN:$1 EXP:$2 MANT:$3\n";
print "5 " . "-" x 50 . "\n";
# looks ok to me
$one = pack "B64", $ieeedouble;
# print $one; # od -t x1 40 04 00 00 00 00 00
8| |23 16|
|___|___| |___|___| |___|___|
|M|M|M|M|M|M|M|M| |E|E|M|M|M|M|M|M| |S|E|E|E|E|E|E|E|
Least Sig. Byte Most Sig. Byte
Sign 1 bit
Exp 9 bits
Mantissa 14 bits
00 60 c0 = -3.5
00 00 40 = 2.0
00 40 40 = 3.0
00 60 40
Hi All,
I have file:
PHI: 15
CA: 32
NY: 14
PHI: 35
NY: 11
CA: 22
NY: 23
CA: 36
I need to put it into hash. Key State, Value Number (Average Value!!!)
So in output I should have:
PHI:25
CA:30
NY:16
-
Do you Yahoo!?
Yahoo! M
Asif Iqbal wrote:
I can use this to get all the env variables
...
Now how can I use this trick to get all the web env variables ? I am using
apache on unix (solaris 8) ?
It's the same way. Here's code that works for me:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
print header;
print st
I
can go native, so much the better.
Thanks.
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
John W. Krahn wrote:
Just a couple of comments if you don't mind. (I knew you wouldn't :-)
Of course not, that's how I keep on learning! :)
Due to way some file systems work I would store the file names in an
array and use the array to rename the files instead of renaming them in
the File::Fi
even a
loss, perhaps, I don't know, but probably not worth caring about if
there is one.
Pete
#!/usr/bin/perl -w
use strict;
use File::Find;
my $dir=$ARGV[0];
$dir='.' if (!defined $dir);
die "$dir is not a valid directory." if (!-d $dir);
$dir=~s#/$##;
find(\&Rename, $
ecture being the one I was particularly missing).
There have been other packages that have not installed for me under RH9.
Mail::SpamAssassin and HTML::Parser being two. I installed perl from
source, and that helped, although I still had to force install
HTML::Parser.
Pete
--
http://emerson.
3pm from Eric Walker:
EW> I don't know if I am reading the data dumper help code right but it seems you
EW> have to provide a list of the hash keys to get the values. I need a way to
EW> just print out all keys and values no matter how many levels of hierachy there
EW> may be i
27;,
RS> );
RS>
RS> $mail{body} = <
RS> First Name: $fname
RS> Last Name: $lname
RS> Email: $email
RS> Organization: $org
RS> Scientific Interest: $sci_int
RS> Mailing List? $check
RS>
RS> sendmail(%mail) || print "Error: $Mail::Sendmail::error\n";
RS>
RS>
RS>
--
http://emerson.wss.yale.edu/perl
Pete Emerson
WSS AM&T Yale University
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Here you go, and your guess as to what prints out is right on; subroutines
don't run until they're called, and placement in this situation doesn't
affect anything.
#!/usr/bin/perl -w
use strict;
print "one\n";
sub aa {
print "two\n";
}
print "three\n";
print "four\n";
sub bb {
prin
not associated with Randal or Linux Magazine in any
way, other than being a subscriber. :)
Pete
Mar 20, 2003 at 10:38am from Larry Wissink:
LW> been able to do comes from reading "Perl & LWP" by Sean M. Burke (O'Reilly
LW> Press).
LW> I include what I have managed to w
ar eq '$fileName';
$string=eval($var);
Pete
Mar 18, 2003 at 11:26am from Navid M.:
NM> Thanks Pete, I actually thought about this, but
NM> because of the format of my perl script, it'll get too
NM> messy if I do this with a regex. The thing is, If I
NM> didn't have any
is coming from your first perl script.
my $filename='filename.txt';
$string=~s/\$filename/$filename/; # Regex! Escape the $ ...
print "$string\n";
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
t;Can't open $file: $!" if (!open INFILE, $file);
or is this a different kettle of fish?
By the way, I really appreciate that this list caters to multiple levels
of "beginners"! I've not only been helped a lot on here, but I hope I've
helped a few myself. :)
--
http://
Thanks for your code, I've gotta look up \Q to make sure I understand
what's happening, but it looks great. I'm still parsing your comments to
make sure I understand everything.
I'm not quite sure what you meant about side effects from my conditional
being frowned upon...how else do you use the ()
(@strings) {
my $success=1;
foreach my $match (@matches) {
($string=~/$match/) ? (next) : ($success=0);
last;
}
($success) ? (print "$string matches.\n") : (print "$string does not match.\n");
}
Pete
--
http://emerson.wss.yale.edu/perl
Pete Em
er;
print start_html;
print "Hello world!\n";
print end_html;
Mar 14, 2003 at 8:16am from Francesco del Vecchio:
FdV> [Fri Mar 14 17:03:11 2003] [error] [client 127.0.0.1] Premature end of script
headers: hello.pl
--
http://emerson.wss.yale.edu/perl
Pete Emerson
WSS AM&T Yale U
The length() function is what you need.
print length($num), "\n";
Mar 12, 2003 at 10:08am from David Gilden:
DG> I am looking for the $num to treated as a string and get the number of characters,
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
this if-then-else
approach. I'd vote for keeping it the way you've done it; I don't think
you'll gain anything by having it on just one line, unless it's just
_satisfying_ to have it that way!
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Jay,
Here's my solution. It doesn't use File::Slurp, as Dan suggested, but it
does what you want it to do. I think that David's point is a good one ...
if you don't need to preserve order, you can just use a hash. This method
will preserve the order of the second file.
P
Mail::Audit can do this for you.
my $mail=Mail::Audit->new();
my $from=$mail->from;
my $to=$mail->to;
my $cc=$mail->cc;
my $subject=$mail->subject;
my $body=$mail->body;
Pete
On Sat, 8 Mar 2003, Mike Blezien wrote:
> Hello All,
>
> I've sent up a .forward file
> }
>
>
> But somehow I think there is a more clever or shorter way.
>
> Is there?
>
Can't you use 'scalar grep($_, @test)' and do something like:
print scalar grep($_, @test) ? "not " : "", "empty\n"
pete peterson
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
txt" or die "Can't open OUTFILE: $!";
while () {
chomp;
($line=~/ /) ? (print OUTFILE "\"$_\"\n") :
(print OUTFILE "$_\n");
}
close INFILE;
close OUTFILE;
Pete
On Thu, 6 Mar 2003, Carrara, Greg wrote:
> Hello,
> I
On Thu, 2003-03-06 at 09:32, Francesco del Vecchio wrote:
> If I have a string as the following:
> a xx b a x b
> and I try a m/a(.*)b/g
> $1 = xx b a x
> what have I to do to obtain two matches each of one give me
> $1 = x
#!/usr/bin/perl -w
u
%variable3=(1,2,3,4);
# |SOMETEXT should NOT get matched
open INFILE, $0;
while () {
while (m#([EMAIL PROTECTED])#g) {
print "$1\n";
}
}
close INFILE;
Pete
On Thu, 2003-03-06 at 02:35, Daniel Mueller wrote:
> i'm currently trying to match all variables in a file, t
unlike
/^(joe|dude)$/. In this case, we can do it either way, but we don't need
to capture anything in the regex, hence the reason why Stefan put that in.
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
#!/usr/bin/perl -w
use strict;
my @list = qw(fred joe bob john dude eddie rob dudette joeshmoe);
foreach (@list) {
print "$_\n" if (/joe|dude/);
}
Note that you'll match on dudette and joeshmoe ... if you want an exact
match, you could do:
print "$_\n" if (/^joe|dude$/);
On Thu, 2003-02-27 a
There are probably oodles of ways of doing this.
Here are two:
# An array slice
@[EMAIL PROTECTED];
or
# start at position 0, remove 9 elements
splice @data, 0, 9;
Pete
On Tue, 2003-02-25 at 14:39, dan wrote:
> onwards. My way of doing this was:
> shift(@data); x 9
--
To unsubscr
I'm not sure what might be the best way to approach this. I'm not comfy
> with an indefinite loop, where if there is some problem removing the lockfile,
> my program would wait forever. I'd rather try for a few minutes, then exit
> with some error.
>
> Any pearls of
On Wed, 19 Feb 2003, Scott, Deborah wrote:
> Does anyone know where I can get a script that looks into the contents of a
> directory and outputs the contents of the directory into a list that is
> displayed on an HTML page? (Also, the names should contain hyperlinks to
> those contents.)
Deborah,
You probably have the module you need already installed.
I did it successfully like this:
perl -e 'use Math::Complex; print log(-2.8e-05);'
On Wed, 2003-02-05 at 11:41, [EMAIL PROTECTED] wrote:
> hi all,
> i am using perl 5.8.0 on ix86. i was using an inbuilt function log().
> i am not able to g
perldoc -q sort
foreach $empNo (sort {$a<=>$b} keys %empName) {
On Tue, 2003-02-04 at 08:17, Rob wrote:
> Hi, I want to sort a hash based on the employee number; I used a foreach
> loop but it sorts the hash based on the ascii value. How would I get it
> to sort on integer values?
--
To unsu
Dan,
Here's my solution. I'm not capturing the days, hours, minutes, seconds
as I go, but I'm sure you can see how to if it's really necessary.
#!/usr/bin/perl -w
use strict;
my @list=('3d4h45m12s', '3h', '5h2m');
foreach (@list) {
my $seconds=0;
my $string=$_;
while ($string=~s/(\
Here's a sample. The trick is to turn on autoflushing ($|=1;) so that
your text gets printed out right away.
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
$|=1;
print header;
print start_html;
for (my $i=0; $i<100; $i++) {
print ".";
sleep 1;
}
print "\n";
print end_html;
On Fri
The error results of useradd appear to go to STDERR instead of STDOUT.
You can redirect them to STDOUT, and therefore capture the results, like
this:
my $username='username';
my $rescmd=`/usr/sbin/useradd -s /bin/false $username 2>&1`;
chomp $rescmd;
print "Result is $rescmd\n";
On Fri, 2003-01-3
I'd be tempted to use a hash of hash of hashes, storing it like this:
$hash{$city}{$station}{add1}=$address1
$hash{$city}{$station}{add2}=$address2
$hash{$city}{$station}{state}=$state
$hash{$city}{$station}{zip}=$zip
$hash{$city}{$station}{phone}=$phone
So my loop would look like this:
foreach my
if ($numexs=~/^\d+$/) {
# do this if $numexs contains 1 or more numbers, nothing else
} else {
}
Your regex just checks to make sure there's one number in your entire
string. Anchor it at the beginning and the end, and then use a + to say
"one or more occurances of" ...
if ($numexs=~/^[0-9]+$
, and the $ENV{SCRIPT_FILNEAME} reflects the fact that
it's test2.pl, even though it's a symlink to test.pl
You may need that Options line in your
section or similar.
Pete
On Thu, 2003-01-23 at 11:24, Harry Putnam, edited by me for brevity,
wrote:
> I hoped to have one real cgi
> if ($result eq $file1)
This is checking to see if each line matches the filename itself, not the
contents of file1. You were going for the contents of $file1, correct?
Here's my stab. Read in the target files first, then match.
When it walks through the source file, it will print out the name
t($_), " messages in ", $_, "\n";
}
$imap->close();
and it moans that I'm not connected on the $imap->login() line.
Can anyone help me make it go? Thanks in advance.
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
$4\n";
print "\$5 --> $5\n";
yields these results:
$1 --> ^7Kore^7Adam
$2 --> killed
$3 --> BEST I TEST
$4 --> by
$5 --> MOD_MACHINEGUN
If "by" is always consistent, it's a bit easier, drop it from the regex
altogether: $text=~/^(.*) ($action
How do you determine which pair(s) of words to group together? Are you
always grouping items 3 and 4, or might you sometimes want "monkey
killed" or "killed elephant" or "with stone" ? There needs to be some
way of determining when to pull out a pair and when not to.
[EMAIL PROTECTED] wrote:
b
ake line for
editable? i.e. right now, line 4 prints out "Edit this", but I can't use
the cursor to delete or modify "Edit this". Is there a way to toggle
this behavior on and off?
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
That works but I want to add some additional text at the bottom of
the image in the bottom margin area. And at times an overlay of text.
When I use the function I get "Not a GD::Image object"
-pete
-Original Message-
From: david [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, Se
My brain is blocking something really simple here.
What I want to do is add a block of text to
a image created as
my $graph = new GD::Graph::pie(1200, 1200);
Could someone show me an example of adding a
wrapbox of text to this image ?
Thanks,
-pete
--
To unsubscribe, e-mail: [EMAIL
My personal choice is "PERL BLACK BOOK"
http://www.amazon.com/exec/obidos/ASIN/1576104656/hotscrcomyourgui/002-58285
00-2101637
.:. -Original Message-
.:. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
.:. Sent: Saturday, September 07, 2002 7:32 PM
.:. To: [EMAIL PROTECTED];
If I put a lot of subroutines in the BEGIN { } section, so that they
load at compile-time, what is the disadvantage?
BEGIN {
eval { require Tk; };
if ($@) {
# Do the NoGUI stuff here
exit;
}
sub LotsOfSharedSubsHere { }
}
use Tk;
print "GUI section.\n";
Lo
I think I'm going in circles. Sorry about the multiple postings.
The program barfs on 'use Tk' even though by the time I get to the 'use
Tk' the Tk module should be installed.
I tried doing require Tk; import Tk;
but then I get this message:
Bareword "MainLoop" not allowed while "strict subs" in
I think I may have answered my own question.
Is there a "better way" (TM) or a more efficient way?
eval { require Tk };
if ($@) { # module is NOT installed
# code here to make sure user is root and wants to proceed
system('perl -MCPAN -e \'CPAN::Shell->install("Tk")\'');
}
use Tk;
etc. etc.
^[Yy]/);
print "You will have to answer a few questions if CPAN is not
configured.\n";
print "Installation may take a while\n";
print "Press enter to continue\n";
$answer=;
system('perl -MCPAN -e \'CPAN::Shell->install("Tk")\'')
ssword'; }
and then call sub Password from my main perl script, but that doesn't
seem like "The Right Way To Do It". Should I be using require instead of
use, or something else?
Pete
--
Those responsible for the signature have been sacked.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
o IMAP and
SSL, that would be great, too.
Pete
--
Those responsible for the signature have been sacked.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Here's my stab at it:
#!/usr/bin/perl -w
use strict;
my %info;
open INFILE, "$ARGV[0]" or die "Can't open file: $!\n"; # Open file specified on
command line
while () {
chomp;
my ($date, @data)=split; # Capture the date, then the rest
$date=~s/_\d{4}$//; # Re
ndle.
which can be downloaded and installed from www.cpan.org. Good luck!
Pete Emerson
--
Mynd you, møøse bites Kan be pretty nasti...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
nybody have tips as to how to get this to work via SSL?
I'm guessing I need to use Mail::IMAPClient's Socket() function,
but I think maybe I need a different module (IO-Socket-SSL???) to
help me out. Any pointers would be appreciated. Maybe there's a module
to do IMAP via SSL?
Jeff 'japhy' Pinyan wrote:
> For the task of parsing quoted strings, my book suggests the inchworm
> method:
>
> push @terms, $1 while
> /\G\s*"([^"]*)"/g or
> /\G\s*(\S+)/g;
Hmmm...mine seems to go into an infinite loop:
#!/usr/bin/perl -w
use strict;
my @terms;
$_='"one two three"
ot; foreach (@ar);
This works, too, but I don't understand what the ?: is for;
my Perl book says it doesn't do backreferences; what does that mean?
Oh, fun with regexes. :)
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
lace "one two" with "one_two" and
"one two three" with "one_two_three", thinking that then I could split on spaces
and then strip out the _, but I didn't have any luck with that, either. Any pointers
would be greatly appreciated.
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Is there a faster way to calculate the hex md5 of a file?
sub md5 {
my $file=shift;
open (FILE, $file) or die "Can't open '$file': $!";
binmode(FILE);
my $hash=Digest::MD5->new->addfile(*FILE)->hexdigest;
close FILE;
return $hash;
}
--
To unsubscribe, e-mail: [EMAIL PRO
Here is an example of what I'm doing to detect whether I've got a scalar value in my
hash
or a hash of hashes:
#!/usr/bin/perl -w
use strict;
my %hash;
$hash{name}='Pete';
$hash{color}{favorite}='Blue';
$hash{color}{car}='Silver';
$hash{color}{hous
ML source. Argh!
Pete
--
Mynd you, møøse bites Kan be pretty nasti...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Okay, so I'm trying to implement your radix sort, and something's going wrong.
When I turn on warnings (I'm using Perl v5.6.0) I get:
Multidimensional syntax $table[substr $_, $i, 1] not supported at ./sort3.pl line 31.
and when I turn on strict:
Can't use an undefined value as an ARRAY reference
hat happens.
Okay, maybe it's wandering a little far from Perl Beginners, but it sure is
interesting!
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
that the data is unsorted or
random,
it might be to your advantage to run the radix algorithm instead.
Thoughts? Anyone done some testing on actual data? What's that timing module
again?
Pete
--
Mynd you, møøse bites Kan be pretty nasti...
--
To unsubscribe, e-mail: [EMAIL PRO
Since we're on the topic of sorts, what are the arguments for
the implemented quicksort vs. a radix sort?
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
When I send mail to a certain address, the mail gets piped to my perl
script.
I'm then using Mail::Internet to extract info, including the From
header.
For me, the header looks like this
Pete Emerson <[EMAIL PROTECTED]>
1. I assume that they're all going to look different. Is tha
Well, suppose my C program does this:
$ ./cprogram
First Name: Pete
Last Name: Emerson
I could use a Perl program like this to analyse the output:
The key is that the backticks execute any executable file and store the
output.
#!/usr/bin/perl -w
use strict;
my $cstuff=`./cprogram`;
my
;);
Now C calling a Perl program:
perlhelloworld.pl
#!/usr/bin/perl
print "Hello, World, in Perl!\n";
cprinter.c gcc -o cprinter cprinter.c
#include
int main() {
system("./perlhelloworld.pl");
}
$ ./perlprinter.pl
Hello, World, in C!
$ ./cprinter
H
dress\n";
$full_address=~/^"(.+)" <(.+)>$/;
$user=$1;
$email=$2;
print "$user\'s email is $email\n";
If the format is ALWAYS going to be this way, this works, otherwise you
might
want to make the regex conditional and do some error checking. Hope that
helps.
If I understand your question correctly, this will work:
#!/usr/bin/perl -w
use strict;
my ($a, $b, $c, $one, $two, $three);
$a=1; $b=2; $c=3;
($one, $two, $three)=Change($a, $b, $c);
print "$one $two $three\n";
sub Change {
my ($x, $y, $z)=@_;
$x++;
$y=0;
$z=10;
return ($x, $y, $z
generous person has more comments to make. I understand
that this might not be the right place for a big "RFC on my program", so
feel
free to stop reading at this point .Thanks very much in advance.
Pete
#!/usr/bin/perl -w
use strict;
use File::
look in to the alarm() function
perldoc -f alarm
+Pete
--
[EMAIL PROTECTED]
;;($_='Yw_xUabcdtefgdijktljkotiersjkUzxT
yvlkbfdtcierstajogvPruntRshackRJelov')=~
y&/RTUv;wxYz$&/ ~'/;$=();$&&&eval&&print
<[EMAIL PROTECTED]> wrote in message
Find out your Perl PID, find out the user who's running it, and kill their
session using `kill`?
+Pete
"Bob Showalter" <[EMAIL PROTECTED]> wrote in message
2E4528861499D41199D200A0C9B15BC031B508@FRISTX">news:2E4528861499D41199D200A0C9B15BC031B508@FRISTX
open(NAMES, "names.txt")||die "$!";
($result = join '', )=~s/\s+/ /g;
+Pete
--
[EMAIL PROTECTED]
;;($_='Yw_xUabcdtefgdijktljkotiersjkUzxT
yvlkbfdtcierstajogvPruntRshackRJelov')=~
y&/RTUv;wxYz$&/ ~'/;$=();$&&&eval&&print
> `"$batch" "$name"`;
> #! doesn't work - and that's the clue of my problems
>
> and also system doesn't want to work with $batch and $name as it's
parameter
`` interpolates.
You probably want:
`"$batch $name"`;
or
e CPAN.pm documentation interesting:
http://www.perldoc.com/perl5.6.1/lib/CPAN.html
Hope this helps
+Pete
--
[EMAIL PROTECTED]
;;($_='Yw_xUabcdtefgdijktljkotiersjkUzxT
yvlkbfdtcierstajogvPruntRshackRJelov')=~
y&/RTUv;wxYz$&/ ~'/;$=();$&&&eval&&print
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tory
Or is it some other message all together? We have a saying somewhere I idle:
Look buddy, doesn't work is a strong statement. Does it sit on the couch all
day? Is it making faces at you? Does it want more money? Please be specific!
So, please be specific! :
isbnInquiry.asp?mscssid=HMUFLHMEL5
NT8N6GL9PCMT2TD1FGAG12&isbn=0596000324
Or at any good bookstore.
+Pete
--
[EMAIL PROTECTED]
;;($_='Yw_xUabcdtefgdijktljkotiersjkUzxT
yvlkbfdtcierstajogvPruntRshackRJelov')=~
y&/RTUv;wxYz$&/ ~'/;$=();$&&&eval&&a
> What I don't yet understand is the other direction: How do I make
> individual configuration variables, taken from database.cfg, available in
> the modules or db.cgi? I guess that would be a job for "require", but am
> not sure.
You have a number of options. My prefered one is to do this:
(opt
isn't perl code and/or doesn't terminate with a true value,
then you're doing something wrong. If you're getting an error about not
being able to find the module, may I suggest:
$file = "/absolute/path/to/files/$FORM{'id'}/options.txt";
eval "
od ne $newmethod)) { ... }
This is covered in perlop, which you can read by:
o Going to http://www.perldoc.com and searching for perlop
o Typing 'perldoc perlop' at a computer with Perl installed
o Opening $perl_dir/html/lib/pod/perlop.html on a computer with Activestate
Perl installed
.com/pub/a/2001/04/10/engine.html
is an article I wrote describing one situation where it's *faster* to use
text files in a search engine... The best thing to do would be to write a
simple test case for each and to test them, using perhaps the profiler
discussed earlier.
Happy to hel
e faster, as far as I
remember
o Try profiling your Perl code to see where it slows down: Brian d Foy
covers this in: http://www.ddj.com/columns/perl/2001/0104pl001/0104pl001.htm
Uh. Before I go any futher I've found a webpage that offers the rest of my
advice and some more:
http://use.
"string" if\and\only\if they're
followed by a ' or ".
Hope that helps.
>From one beginner to another (i.e. someone else is about to point out a
better way),
Pete
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I wonder why the use of sprintf? I would have done it this way:
foreach (@list) { $_=":$_"; }
Is there something that the sprintf does that I'm missing, or is this
just another way to skin the same cat? Perhaps in other circumstances
sprintf is superior?
Just curious,
> @hosts = ( list of hashes like below ... );
> %hosts = ( name => "hostname",
> ipaddr => "www.xxx.yyy.zzz",
> location => "location"
>);
>
> How can produce a sorted list of the hashes based on the hostname and then
> access each hash to print the details.
>
@hosts = sort { %{$a}
How do I insert $scalar into position $x of @array, where $x is smaller than
$#array?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ould suggest is writing a
script that you 'require' that will return a username and password. You
could do all kinds of magic to hide and encrypt the user/pass that this
script returns, and so on.
+Pete
--
---
($_='Yw_
1 - 100 of 128 matches
Mail list logo