Hi,
I need to know if there is any easiest way to keep session data or object
accross the scripts.
Basically I would like to pool Database connections so that Parrallel
running scripts don't open multiple connection with the database.
with regards
Rajeev Rumale
- Original Message -
Fro
Thanks Brett
Will surely download CygWin32... anyway I wanted to install it for Perl
Regards
Joel
At 10:44 AM 6/20/2001 -0400, Brett W. McCoy wrote:
>On Wed, 20 Jun 2001, SAWMaster wrote:
>
> > Yes and no. You cannot do it with telnet, but you can get what you want by
> > using an x-term clie
Thanks SAWMaster (Not your real name I suppose)
Will surely give it a try but I am looking for a free software
Regards
Joel
At 09:25 AM 6/20/2001 -0500, SAWMaster wrote:
>Yes and no. You cannot do it with telnet, but you can get what you want by
>using an x-term client and setting up the ser
Thanks Derek
Regards
Joel
At 03:01 PM 6/20/2001 +0100, Derek Harding wrote:
>On Saturday 16 June 2001 07:28, Joel Divekar wrote:
> > Hi
> >
> > Hey can we run KDE or Xwindows by telneting to Linux servers ???
> >
> > Regards
>
>Not by telnet but certainly it is possible to run "dumb" terminals
> Which linux command i use to run a perl script that will stay
> running in my
> server even when i logout via telnet?
> Thanks
nohup command &
then you can logout and the command will run and run
or do as I am, daemonise it :)
-ROn
My personal favorite is this:
#print 'command' | at now
That's the print command (your system should have the print command,
otherwise use echo) followed by the command I want to run in single quotes
(in case you have weird characters in the command), then piped to at. at
will daemonize it for
> global symbol $user requires explicit pakage name at
try addind my infront of $user
IE:
my $user
it sounds like you are trying to use a variable that has not been defined,
that is you are useing "use strict" and or "perl -w" but did not my the
variabled
#!/usr/bin/perl -w
use strict;
# thi
D.J.B. is quite the character.. ;)
> I also have tried removal but I get this great little insulting remark that
> could only have been produced by a 'secret loyal order of Unix programmers'
> bit bombardier!
>
> Hi. This is the qmail-send program at onion.perl.org.
> I'm afraid I wasn't able t
Where did you sent it to ?
It should be [EMAIL PROTECTED] and
[EMAIL PROTECTED]
and it will send you back email for confirmation that you
have to reply,
Mohamad
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 7:50
I also have tried removal but I get this great little insulting remark that
could only have been produced by a 'secret loyal order of Unix programmers'
bit bombardier!
Hi. This is the qmail-send program at onion.perl.org.
I'm afraid I wasn't able to deliver your message to the following addresses
On Wed, Jun 20, 2001 at 11:41:29PM +0100, Mark Bedish wrote:
> I am using substrings in a screipt and wondered if there was a better
> perlish way to do it. I am taking data from a mainframe system and
> reformatting it but the substring seems to be quite slow, like visual
> basic, the original.
>
I should have stated more clearly -
This is a Perl Module I'm writing. The table already exists and I'm just trying
to pull the data out and run certain stats on them, one of which is the
averages. If I write it like "Select avg($$answer[0]), avg($$answer[1],
avg($$answer[2]) from
evaluation w
Sorry, I forgot to reply to all when I replied:
If I understand what you are needing to do, rather than running the select
statement multiple times, it would be much more efficient to use a group by
SQL statement? I can't tell for sure about that part from what you have
written. However, if each
Hi I got the message:
global symbol $user requires explicit pakage name at
logout.pl line 10.
please give a tip to solve this problem.
=
Peter Lemus
UNIX/NT Networks Engineer
[EMAIL PROTECTED]
--The universe too big for us to be alone; the question is who is out-there?
--A wise man will be
Here's the results that I get with the regex below. I don't know why
I'm getting the first three lines or why it stops after the seventh of
apx90 lines.
I'd appreciate any help in fixing this.
Thanks,
Jack
2000-12-29,16:16:19,PST
2000-12-29,16:16:19,PST
2000-12-29,16:16:19,PST
200
This is my first posting so forgive my ignorance.
I am using substrings in a screipt and wondered if there was a better
perlish way to do it. I am taking data from a mainframe system and
reformatting it but the substring seems to be quite slow, like visual
basic, the original.
Any pointers on a
i'd say, there is no 'like' operator...
hth,
Jos
- Original Message -
From: "Ward, Stefan" <[EMAIL PROTECTED]>
To: "Perl Beginners (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 12:03 AM
Subject: if statement
> This isn't working for me. Help please. What is wrong with
This isn't working for me. Help please. What is wrong with the second if
statement
while ( ($timestamp, $report_type, $game_name, $data_name, $data_value) =
$ora_sth->fetchrow_array)
{
if (($data_name eq 'min') || ($data_name eq 'time')) {$data_value =
$data_value * 144
I'm trying to print out statistics on a web page, based on an evaluation
form, where the person filling it out answers some questions with values
1-4. These are then stored in a MySQL database. I need to print out
averages for each question, and throw out any zeros (which means they
didn't selec
At 04:33 PM 6/20/01 -0400, Yacketta, Ronald wrote:
>exec "egrep -c $lookFor @{$LOGS[$_ - 1]} >out" unless $pid=fork; # fork new
>process for cmd
>
>
>results in:
>
>sh: Fault: not found
>egrep: can't open App
>egrep: can't open Finished
>sh: Bind: not found
>sh: SystemError: not found
Oh great, y
I dont see you doing any lwp action in this script, and i'm quite unsure why
CGI::ReadParse is used at all...
even tho this may make me a fish giver, i'd like you to concider the
following:
### SCRIPT ###
use strict;
use LWP::UserAgent
my $url = 'foo.bar.com/index.html';
### Set up the useragen
Derrick wrote:
> Cannot get a connect to Mysql using DBI
> [snip]
> The code I'm using to connect is.
>
> $dbhandle = DBI->connect("dbi:mysql:products", "",
> "") || &error("\nCouldn't
> co
> nect to DB.\n\n ".$?);
>
> I've modified it Like this
>
> $dbhandle =
> DBI->connect("dbi:mysql:produ
Putting the regex as an if statement fixed the problem. Although I could
have sworn I had tried that earlier and it didn't work.
Thanks all for the help
Tom
--
#!/usr/bin/perl -w # 526-byte qrpff, Keith Winstein and Marc Horowitz
<[EMAIL PROTECTED]> # MPEG 2 PS VOB file on stdin -> descrambled
try capturing the output:
perl foo.pl > outputfile.txt
all that perl spits out should be in the outputfile.txt then
regards,
Jos Boumans
- Original Message -
From: "james crease" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 10:49 PM
Subject: compilation
This might help:
http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html
Greg
--- "Derrick (Thrawn01)" <[EMAIL PROTECTED]> wrote:
> Cannot get a connect to Mysql using DBI
> I get these error messages
>
> DBI->connect([EMAIL PROTECTED]:3306) failed: Can't connect to MySQL
> server
> on '330
I mean I do this:
foreach $value(keys(%hash)){
print "$value is $hash{$value}\n";
}
SO the output would be like:
305 is Offline
309 is Offline
is Offline
900 is Offline
I can't figure out where the " is Offline" is coming from.
Thanks,
Tom
--
#!/usr/bin/perl -w # 526-byte qrpff, Kei
The code is exactly the same in both cases. Here is more detail:
use LWP::Simple;
use CGI;
CGI::ReadParse(*in);
$q=new CGI; #invoke CGI object
print $q->header('text/html');
#unfix passed url to true url
$url1 = $in{"site"};
$url1 =~ s//\?/;
$url1 =~ s/\*\*\*\*/&/g;
#check for existe
ok, here's a few things:
dont use a dozen exclemations marks if you dont want to get flamed or even
ignored or... well, you fill it in
dont whine, state what is wrong and where
read the manual that comes with the dbi/dbd modules, it will tell you a
whole lot about the syntax and how to properly ca
On 20 Jun 2001 12:52:20 -0800, Michael Fowler wrote:
> On Wed, Jun 20, 2001 at 04:38:14PM -0400, Chas Owens wrote:
> > The Perl syntax to match the VB loop above is:
> >
> > while ($a = 5 or $b = 2) {
> > blah blah blah;
> > }
>
> Chas, of course, meant ==, not =, as in:
>
> while ($a =
On Wed, Jun 20, 2001 at 03:33:17PM -0500, Eric J. Wisti wrote:
> @var is array {or list}
@var is always an array.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
On Wed, Jun 20, 2001 at 04:38:14PM -0400, Chas Owens wrote:
> The Perl syntax to match the VB loop above is:
>
> while ($a = 5 or $b = 2) {
> blah blah blah;
> }
Chas, of course, meant ==, not =, as in:
while ($a == 5 or $b == 2) {
...
}
VB has some weird things going on
I have a perl script which generates many compilation errors which
scroll off the DOS window perl is running in. How do I capture (or
recover) the lines that have scrolled away?
--
james crease
forgive me if i miss the obvious, but the below is, i think, the same as:
if (head($in{"site"}) && !$in{"backit"}) { ... }
and i can't deduce any 'gut code' from that from which i might retrieve the
error...
so maybe you can post what worked before and what doesnt now?
regards,
Jos Boumans
Cannot get a connect to Mysql using DBI
I get these error messages
DBI->connect([EMAIL PROTECTED]:3306) failed: Can't connect to MySQL
server
on '3306' (22) at builddb.pl line 5
DBI->connect(products) failed: Can't connect to local MySQL server through
sock
t '/tmp/mysql.sock' (111) at builddb.p
On Wed, Jun 20, 2001 at 03:35:23PM -0400, Richard J. Barbalace wrote:
> ($package, $filename, $line, $subroutine) = caller();
As a minor correction, this is incorrect. The argument-less form of caller
returns only three elements: package, filename, and line.
> So, I guess my questions a
On 20 Jun 2001 17:23:53 -0300, Sebadamus wrote:
> Hello,
>
> I am starting with Perl; and I have to make programs previously made in
> Visual Basic in Perl... (at least Windows wont hang up, now I am using linux
> :-
>
> Well, I made a little menu that reads from a config file and update it,
On Wed, Jun 20, 2001 at 04:21:07PM -0400, Yacketta, Ronald wrote:
> I have tried that, but exec fails...
> exec ( 'egrep', "-c" , $lookFor , @{$LOGS[($_ -1)]} ) unless $pid=fork; #
> fork new process for cmd
>
> is my current line.. I have tried several different ways to add the > out
> and no go
> exec "egrep -c $lookFor @{$LOGS[$_ - 1]} >out" ...
>
> Unless you need to protect against malicious entries in
> @LOGS, this'll get
> you going.
okay, a bit more info...
$lookFor="Test App Finished|Fault
2-0|ORA-|Bind|SystemError|SystemException|Communication|ORBA|Get Q Error";
foreach (@al
When you say 'print', what does your code look like? foreach uses a list
(not a hash, @var is array {or list}, %var is a hash), and steps through
each list item one by one. You'd need to use 'keys' or 'values' output
against the hash... Like:
print join("\n", keys %hash), "\n"; or
print join("\n
At 04:21 PM 6/20/01 -0400, Yacketta, Ronald wrote:
> > Well, exec simply replaces your perl script with whatever you
> > give it,
> > so if you want redirection, just use '>'
> >
>
>I have tried that, but exec fails...
>exec ( 'egrep', "-c" , $lookFor , @{$LOGS[($_ -1)]} ) unless $pid=fork; #
>fo
On 20 Jun 2001 10:20:20 +0100, Wayne Bridgman wrote:
> Hi Beginners,
>
> Does anyone know how I can look for a certain phrase within a sql file
> (approx 6 words, normally part of a header)?
> Thanks in advance,
> Wayne
>
Well, that depends on what you mean by "look for" and "sql file". If
you
I've written a program that checks for the existence of a website by
retrieving an HTTP header when fed a URL. It works beautifully on my server
(NT running Windows '98) but locks when I installed it on my client's server
(NT running Windows 2000). The important guts of the code are:
us
> Well, exec simply replaces your perl script with whatever you
> give it,
> so if you want redirection, just use '>'
>
I have tried that, but exec fails...
exec ( 'egrep', "-c" , $lookFor , @{$LOGS[($_ -1)]} ) unless $pid=fork; #
fork new process for cmd
is my current line.. I have tried se
You should never use $1 without testing to see whether or not the regexp
found something, try:
while () { $users{$1} = "Offline" if (/^(\d{3})/) }
or the more verbose
while () {
#if this line has a key
if (/^(\d{3})/) {
#then add it to the hash
$u
You can't store to a variable, since your program is no longer there :)
- Original Message -
From: "Yacketta, Ronald" <[EMAIL PROTECTED]>
Date: Wednesday, June 20, 2001 4:10 pm
Subject: exec()
> Folks,
>
> I have been searching perldoc, books and some online resources as
> to a way
> t
Its not matching a blank line somewhere in the file try
/^(\d{3})/ && $users{$1} = "Offline";
so a key is created only if the match succeeds
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat
Well, exec simply replaces your perl script with whatever you give it,
so if you want redirection, just use '>'
- Original Message -
From: "Yacketta, Ronald" <[EMAIL PROTECTED]>
Date: Wednesday, June 20, 2001 4:10 pm
Subject: exec()
> Folks,
>
> I have been searching perldoc, books and
thanks everyone I got it now.
-Original Message-
From: George Matthes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 4:04 PM
To: '[EMAIL PROTECTED]'
Subject: RE:
unsubscribe
Okay, I tried what you suggested, but I modified it a bit. Here's what I
put:
while() {
/^(\d{3})/;
$users{$1} = "Offline";
}
Then I do a foreach loop to print out the keys and the values. That's
fine, but for some reason I get a line like this:
: Offline (note: WHen I print out
Folks,
I have been searching perldoc, books and some online resources as to a way
to redirect output from exec() from stdout to a file (or possibly an array)
I am running the following (Thanxs to Paul for his skeleton code)
exec ( 'egrep'. "-c", $lookFor, @{$LOGS[($_ -1)]} )
basically, it is ju
Hello,
I am starting with Perl; and I have to make programs previously made in
Visual Basic in Perl... (at least Windows wont hang up, now I am using linux
:-
Well, I made a little menu that reads from a config file and update it, may
be some one woult find it useful (or may be not :-( Am an
unsubscribe
Could you post the contents of the two files you are using?
On 20 Jun 2001 14:59:37 -0500, Nick Transier wrote:
> I tried that, same error. "$perlversion requires explicit package name"
>
>
> >From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: Nick Transier <[EM
I tried that, same error. "$perlversion requires explicit package name"
>From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: Nick Transier <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: method calls outside the package
>Date: Wed, 20 Jun 2001 15:53:50 -0400
On 20 Jun 2001 11:28:58 -0500, Nick Transier wrote:
> I have two different packages that access each others methods. (where in my
> case one package is an element I have defined and the other package is an
> implementation of a list of those elements) When I call a method from
> package 1 with
On Jun 20, Nick Transier said:
>package blah;
>{
>sub foo {
> print "I do not understand perl"
Missing a semicolon above...
> return 5;
>}
>}
>
>Now, how do I call this function from outside the package?
blah::foo() will work.
>$perlversion = blah::->foo;
That works too, but kind
Ok, I have a package
package blah;
{
sub foo {
print "I do not understand perl"
return 5;
}
}
Now, how do I call this function from outside the package?
I have written this:
$perlversion = blah::->foo;
but it doesn't work, it asks for explicit package name.
Please help.
-Nick
>I have recently used the caller function in a module I was writing.
>
>I think your problem is here:
>
>>13: my $i = 0;
>>14: while (my ($package, $filename, $line, $subroutine) = caller ($i)) {
>
>When you call caller with 0, it returns the curent subroutine. If you
>call it with 1 it
On Wed, 20 Jun 2001, Nick Transier wrote:
> I have written a module I want to test in a shell program, how do I load the
> module in another perl file to test the methods of the module's packages?
use ;
Don't append .pm to the name, it is assumed.
I suggest you take a look at 'perldoc perlmod'
On Wed, Jun 20, 2001 at 09:11:53PM +0200, Alen Sarkinovic wrote:
> Can anybody send me code of perl that will take input from web and
> execute Unix command ,I mean SYSTEM(/bin/somecommand $variable)
Despite someone's suggestion not to reply, I must.
This is an insanely bad idea. Don't do t
Hi.
I've programmed in Perl for several years, but this feels like a
beginner question. I'm trying to understand how the built-in function
"caller" works. The documentation leads me to expect "caller" to do
something other than what it actually does. I'd like to figure out if
I'm simply misund
I have written a module I want to test in a shell program, how do I load the
module in another perl file to test the methods of the module's packages?
-Nick
_
Get your FREE download of MSN Explorer at http://explorer.msn.com
So, is this what you're looking for:
#!/usr/local/bin/perl
use warnings;
use strict;
my $item;
my %hash;
#open(FILE, "file") or die "Can't open file: $!\n";
while () { # using builtin data
# match line of at least 3 digits at beginning of line
/^(\d{3})/; # or more visually $_ =~ /
For god's sake, nobody reply :)
- Original Message -
From: "Alen Sarkinovic" <[EMAIL PROTECTED]>
Date: Wednesday, June 20, 2001 3:11 pm
Subject: need code
>
>
>
> Hi
> Can anybody send me code of perl that will take input from web
> and execute Unix command ,I mean SYSTEM(/bin/some
Hi
Can anybody send me code of perl that will take input from web and execute Unix
command ,I mean SYSTEM(/bin/somecommand $variable)
I have try everything but still not able to execute from web ,everything goes fine
from command line :perl -T script.pl variable=blabla
Are you trying to use a hash??
---
@myArray = qw(one two three four);
&new;
sub new {
$self{'Next'} = \@myArray;
}
print "Element 0 is $self{'Next'}->[0]\n";
---
You can't specifiy the size of the array, it's dynamic. Just enter your data
into the array and it will change size accordi
On Tue, Jun 19, 2001 at 03:41:40PM -0500, Jeff Wagg wrote:
>
> Hi,
> I was just wondering if there were any file test operators (or
> modules containing these operators) which tested files for their type. For
> example, is there a way to test a file to see whether or not it's in FITS
> form
Try $item=~/^\d{3}/;
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat Certified Engineer
[EMAIL PROTECTED]
fax 713-896-5266
>>> Tom Yarrish <[EMAIL PROTECTED]> 06/20/01 01:51PM >>>
Hey all,
Well, th
On Wed, Jun 20, 2001 at 11:26:32AM -0700, Paul Burkett wrote:
> Basically I'm suppose to be able to change the cameras
> which are displayed on the webpage. Right now I can
> change the cameras displayed on the webpage by
> accessing Tip and typing in a command like '@01' (any
> value through @01-
Hey all,
Well, the subject says it all. Four days removed from a Perl class, and I
feel like I'm forgetting everything (guess that's what happens when you
don't take Randal's class ;p).
Anyway, here's what I'm trying to do. I have a file that I'm reading into
the program with an open command. E
On Wed, Jun 20, 2001 at 03:01:00PM -0500, Abdulaziz Ghuloum wrote:
> Hello Ron and everybody on this list.
>
> In order to find the best way to complete the task the fastest way, you need to
> first analyse your system and how it's going to react to your algorithm.
> Basically your task can be spl
Basically I'm suppose to be able to change the cameras
which are displayed on the webpage. Right now I can
change the cameras displayed on the webpage by
accessing Tip and typing in a command like '@01' (any
value through @01-@16) also you can type in '@22' (any
value through @22-@44) and it will
On Wed, Jun 20, 2001 at 11:06:19AM -0700, Paul Burkett wrote:
> He do you or anybody know of a program like TIP
> (creates a terminal connection to a remote host) that
> will work in Perl, right now all I get is "tip:must be
> interactive", thanks.
What's giving you this error message? If you're
heh, thanks that might explain why it is working, I'm
just using last ditch efforts to get this thing to
work.
He do you or anybody know of a program like TIP
(creates a terminal connection to a remote host) that
will work in Perl, right now all I get is "tip:must be
interactive", thanks.
> On We
On Wed, Jun 20, 2001 at 09:59:38AM -0700, Paul Burkett wrote:
> As a last ditch effort to get this serial device to
> write I found a Perl module called "IPC::Open3" it
> seems to have the ability to write to a serial device.
I'm not sure where you got this idea. IPC::Open3 is for reading and wr
Hey SAWMaster,
Wednesday, June 20, 2001, 12:10:49 PM, you wrote:
S> Hi group.
S> Short 'n sweet question. Is there a way to run perl programs from
S> the command line without having to precede usage with "perl"
I see you are running M$ Win, but which version? What Perl are you
running? I have
At 01:10 PM 6/20/01 -0400, Yacketta, Ronald wrote:
> > my $timex = `(timex ps -ef > /dev/null) 2>&1`; # /dev/null
> > has 2 ells on
> > my system
> > $timex =~ tr/\n//s; # Embedded and trailing blank lines
> > $timex =~ s/^\n//;# Leading blank line
>
> @oratime = qx((timex ps -ef >
> "Brett" == Brett W McCoy <[EMAIL PROTECTED]> writes:
Brett> On Wed, 20 Jun 2001, Nick Transier wrote:
>> You are saying I cannot set the size of an array? I understand that you do
>> not have to, but I need to in this case so that my iteration loops work
>> correctly.
Brett> No you don't:
Does anyone know of a way to modify the Terminal Server Profile Path
property of an NT account with Perl? The only way to modify this property
from a command line that I have found so far is with tsprof.exe which is
included with NT4 TSE and W2K. So, I could use a Perl script to build a
.cmd fil
> my $timex = `(timex ps -ef > /dev/null) 2>&1`; # /dev/null
> has 2 ells on
> my system
> $timex =~ tr/\n//s; # Embedded and trailing blank lines
> $timex =~ s/^\n//;# Leading blank line
@oratime = qx((timex ps -ef > /dev/null) 2>&1 );
foreach my $holder (@oratime) {
> $str =~ s/^\s+//; # remove the first line
odd!
this results in
Use of uninitialized value at ./beta.pl line 58.
Use of uninitialized value at ./beta.pl line 58.
=>
Use of uninitialized value at ./beta.pl line 59.
Use of uninitialized value at ./beta.pl line 59.
real => 0.06
user => 0.04
sys
At 12:33 PM 6/20/01 -0400, Yacketta, Ronald wrote:
>Folks,
>
>I have been looking for a little regex that would remove NULL (blank) lines
>from input.
>I have a little script that parses the output of timex (unix), unfortuanly
>the timex output
>is prepended with a blank line and appended with a b
On 20 Jun 2001, Randal L. Schwartz wrote:
> The problem with references is that they have a very hard to explain
> but completely intuitive interface. :)
Gee, just like pointers in C! :-)
-- Brett
http://www.chapelperilous.net/btfwk/
--
As a last ditch effort to get this serial device to
write I found a Perl module called "IPC::Open3" it
seems to have the ability to write to a serial device.
Does any body have any experience with it? I read the
documentation on CPAN.org's site numerous times but
kept on asking myself "Duh, what?"
>
> Not withstanding my other comment, this code is also inefficient,
> both tactically and strategically.
I know it was horrendous code, it was just the first thing that popped
into my head. After I had it working I was going to make it more
efficient.
>
> Take for example the string "\200a
On Wed, 20 Jun 2001, Nick Transier wrote:
> You are saying I cannot set the size of an array? I understand that you do
> not have to, but I need to in this case so that my iteration loops work
> correctly.
No you don't:
foreach $i (0..@array) {
print "$array[$i]\n";
}
@array used in a
> "Nick" == Nick Transier <[EMAIL PROTECTED]> writes:
Nick> So then would I access the nth element by
Nick> @{$self->{Next}}[n] ??
Uh, no. That looks like @foo[3], which works for some broken values
of "works". You want $foo[3], so to backtrace that, use ${$self->{Next}}[$n],
also written
Hello
Say you obtained the output using the backticks:
$str = `(timex ps -ef > /dev/nul) 2>&1`;
then just
$str =~ s/^\s+//; # remove the first line
%timex = split(/\s+/, $str);
print "$_: $timex{$_}\n" for keys %timex;
will output:
real: 0.00
user: 0.00
sys: 0.00
(order is not preserved, but
You are saying I cannot set the size of an array? I understand that you do
not have to, but I need to in this case so that my iteration loops work
correctly.
>From: John Edwards <[EMAIL PROTECTED]>
>To: 'Nick Transier' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: $self def
>Date: Wed,
So then would I access the nth element by
@{$self->{Next}}[n] ??
>From: [EMAIL PROTECTED] (Randal L. Schwartz)
>To: "Nick Transier" <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: $self def
>Date: 20 Jun 2001 09:29:41 -0700
>
> > "Nick" == Nick Transier <[EMAIL PROTECTED]> writes:
Folks,
I have been looking for a little regex that would remove NULL (blank) lines
from input.
I have a little script that parses the output of timex (unix), unfortuanly
the timex output
is prepended with a blank line and appended with a blank line as such
(timex ps -ef > /dev/nul) 2>&1
[begin
Hello Ron and everybody on this list.
In order to find the best way to complete the task the fastest way, you need to
first analyse your system and how it's going to react to your algorithm.
Basically your task can be split into 2 parts, one IO intensive part (reading
the files) and one CPU inte
> "Nick" == Nick Transier <[EMAIL PROTECTED]> writes:
Nick> Given this is my definition for self in some new constructor:
Nick> sub new {
Nick>$self {
Nick> Next => @[Max_Level],
Nick>}
Nick> }
Nick> First, is this the proper way to have Next be a reference to a
I have two different packages that access each others methods. (where in my
case one package is an element I have defined and the other package is an
implementation of a list of those elements) When I call a method from
package 1 with an object from package 2. the method in package 1 takes a
$
> "Randal" == Randal L Schwartz <[EMAIL PROTECTED]> writes:
Randal> Take for example the string "\200abc"...
Randal> After you replace "\200" with "&200;",
Oh blah. I can't do math this early. "\200" is replaced with "€",
but the rest of the comment stands. :)
--
Randal L. Schwartz - St
Given this is my definition for self in some new constructor:
sub new {
$self {
Next => @[Max_Level],
}
}
First, is this the proper way to have Next be a reference to an annonymous
array of size Max_Level?
More importantly, how do you reference the elements in the a
> "Crystal" == Crystal Gruetzmacher <[EMAIL PROTECTED]> writes:
Crystal> Is this your homework?
Nahh... that stuff is too freaky to be homework. I'll wager a pint or
two that this is a new guy hired to replace a guy who got smarter and
moved on to a better job, and the new guy now has inher
Hi group.
Short 'n sweet question. Is there a way to run perl programs from the command line
without having to precede usage with "perl"
so I can go
myprogram [Arguments]
Instead of
perl myprogram [Arguments]
If there is no way to do this...would making a bat file (windows) of the same nam
> "Chas" == Chas Owens <[EMAIL PROTECTED]> writes:
Chas> #replace anything not in lower ASCII, Damn Americans
Chas> for (my $i = 0; $i < length($file); $i++) {
Chas> my $char = ord(substr($file, $i, 1));
Chas> if ($char > 128) {
Chas> print "replacing ", chr($
Is this your homework?
Crystal
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 4:19 AM
To: [EMAIL PROTECTED]
Subject: Can you someone help me please
Hi All,
I have been asked to transform this bit of PERL coding into plain english,
1 - 100 of 165 matches
Mail list logo