Ahmed Moustafa wrote:
> Tagore Smith wrote:
>
> > Ahmed Moustafa wrote:
> >
> >
> >>So, how can a new different process by forked? Or, how a function be
> >>called and the next step execute without waiting for the previous
> >>function to terminate?
> >>
> >
> >For your original question (thr
Tagore Smith wrote:
> Ahmed Moustafa wrote:
>
>
>>So, how can a new different process by forked? Or, how a function be
>>called and the next step execute without waiting for the previous
>>function to terminate?
>>
>
>For your original question (threads) see perldoc perlthrtut.
>
>Whe
Ahmed Moustafa wrote:
> So, how can a new different process by forked? Or, how a function be
> called and the next step execute without waiting for the previous
> function to terminate?
For your original question (threads) see perldoc perlthrtut.
When you fork a child process the call to
Jim Conner wrote:
> At 20:28 03.25.2002 -0800, Ahmed Moustafa wrote:
>
>>> Jim Conner wrote:
>>>
I suck at this kind of topic but the only way I can think of doing
such a thing is this:
Use IPC.
fork off something like 10 children each child working on a separate
>
At 14:43 03.26.2002 +1000, senrong wrote:
>I am a student who is new to Perl.and that my assignment is due this
>following week...
>
>can anyone tell me where can I get a free server to run on my own PC.
>
>Pls reply ASAP...
>
>thanks...
>
>
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTE
On Monday 25 March 2002 10:43 pm, senrong wrote:
> I am a student who is new to Perl.and that my assignment is due this
> following week...
>
> can anyone tell me where can I get a free server to run on my own PC.
http://RedHat.com , dude
--
Robert Brandtjen
---
At 20:28 03.25.2002 -0800, Ahmed Moustafa wrote:
>>Jim Conner wrote:
>>
>>>I suck at this kind of topic but the only way I can think of doing such
>>>a thing is this:
>>>
>>>Use IPC.
>>>
>>>fork off something like 10 children each child working on a separate
>>>file and use sysvmsg sysvshem (I d
Timothy,
I was to wrapped up in the code to spend 5 minutes thanking you. My
apologizes for that. The code worked perfectly. Thank you very much for
that :)
Regards,
Dan
-Original Message-
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 26 March 2002 1:33 PM
To: Danie
I am a student who is new to Perl.and that my assignment is due this
following week...
can anyone tell me where can I get a free server to run on my own PC.
Pls reply ASAP...
thanks...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> Jim Conner wrote:
>
>> I suck at this kind of topic but the only way I can think of doing
>> such a thing is this:
>>
>> Use IPC.
>>
>> fork off something like 10 children each child working on a separate
>> file and use sysvmsg sysvshem (I do not believe these are functions
>> and I can't l
Jim Conner wrote:
> I suck at this kind of topic but the only way I can think of doing such
> a thing is this:
>
> Use IPC.
>
> fork off something like 10 children each child working on a separate
> file and use sysvmsg sysvshem (I do not believe these are functions and
> I can't look the rig
I suck at this kind of topic but the only way I can think of doing such a
thing is this:
Use IPC.
fork off something like 10 children each child working on a separate file
and use sysvmsg sysvshem (I do not believe these are functions and I can't
look the right functions up for you right now
Oh, okay. I thought you just weren't sure how to access the data.
print "Enter your username: ";
chomp($input = );
if($users{$input}){
print "Welcome, $input.\n";
foreach(sort keys %{$users{$input}}){
print " $_ owes ${$users{$input}}{$_}\n";
}
}else{
Matthew Harrison wrote:
> What exactly do you mean by 'thread'?
I've a loop which scans directories looking for files and processes the
existing files. I'd like process each file independently (i.e. in
parallel) rather than sequentially.
>
> On Mon, 25 Mar 2002, Ahmed Moustafa wrote:
>
>
>>
What exactly do you mean by 'thread'?
On Mon, 25 Mar 2002, Ahmed Moustafa wrote:
> How can I thread a function in Perl?
>
> Any help will be appreciated so much.
>
> Regards,
>
--
Matthew Harrison
Internet/Network Services Administrator
Peanut-Butter Cheesecake Hosting Services
Genestate
ww
Try this:
foreach $key(sort keys %users){
foreach $inkey(sort keys %{$users{$key}}){
print "$key, ${$users{$key}}{$inkey}\n";
}
}
-Original Message-
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 6:23 PM
To: Matthew Harris
How can I thread a function in Perl?
Any help will be appreciated so much.
Regards,
--
Ahmed Moustafa
http://pobox.com/~amoustafa
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If your only concern is hiding the source, you might want to check out
ActiveState's PerlApp. I'm really pleased with v4.0 so far. Especially
since the executables are up to 60% smaller (in my experience). There is
also perl2exe, but I haven't used the full version.
-Original Message-
Hm, yes I was thinking of that but I have gone against it. After
tweaking around with my code I was able to insert all the date into a
hash...
%users = (
'Username1' => {
'Comapny1' => 'owing1'
},
'Username2' => {
Hi All
I have been looking into perlcc for a little while as I would like to compile a
program to make the source unreadable, and haven't had much luck as it was compiling
files of about 20MB which makes it a little harder for people to download - but I have
just started using the perlcc -B by
Andskotans helvístis rugl er þetta...
Var búin að fara inn á gömlu fréttirnar en það koma ekki upp myndirnar sem ég
er að sækjast eftir auk þess eru þetta pínulitlar myndir sem ekki er hægt að
nota stakar, sem sagt það vantar afrit af orginal myndunum.
Kveðja
Þessi kolruglaði sem skilu
That is exactly my stand too. I have found it much easier to learn some
simple and re-useable MySQL functions using the DBI module, than to learn
regex and all the other crap associated with manipulating strings etc.
On Mon, 25 Mar 2002, Crook, Richard W wrote:
> Well from a beginner's point
Well from a beginner's point of view, plus the KISS priciple I'd say you
should keep your data in a database like MySQL. You would then organize the
data by:
USERNAME FULLNAME COMPANY OWING
username1 fullname1 company1 owing1
username2 fullname2 company2 owing2
Where you access the d
Sounds like you are looking for a hash of arrays. From _Programming_Perl_ :
Use a hash of arrays when you want to look up each array by a particular string rather
than merely by an index number. In our example of television characters, rather than
merely looking up the list of names by th
Agustin Rivera wrote:
>
> Is there anyway to change the Default Input Record Separator.. or $/ .. to
> allow me to read a character at a time?
>
> I tried$/=~ /./;but it doesn't work.
$/ = \1;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
I am still new to Perl as well.
I want the end result to look like the following...
USERNAME FULLNAME COMPANY OWING
username1 fullname1 company1 owing1
username2 fullname2 company2 owing2
and so on
Then I need for a user to type in their username and I need my script to
be able
PERFECT. You don't know how much I appreciate this...
Much thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Timothy Johnson" <[EMAIL PROTECTED]>
To: "'Agustin Rivera'" <[EMAIL PROTECTED]>; "Timothy Johnson"
<[EMAIL PROTECTED]>; <[EMAIL
Check out the read() function.
perldoc -f read
Is this what you are looking for?
-Original Message-
From: Agustin Rivera [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 5:16 PM
To: Timothy Johnson; [EMAIL PROTECTED]
Subject: Re: Default Input Record Separator
Yeah, but the pr
Or perhaps a list of lists... Maybe you should describe your HOH better.
What do you want the end result to look like?
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 5:18 PM
To: Daniel Falkenberg
Cc: [EMAIL PROTECTED]
Subject: Re: Can I
I know i'm still only learning perl so feel free to ignore me if i've said
something stupid, but wouldn't tha be better as a list instead of a hash?
On Tue, 26 Mar 2002, Daniel Falkenberg wrote:
> Hello All,
>
> Just wondering how I would go about setting up the following hash and if
> it woul
Yeah, but the problem is I don't want to wait for $_ to reach the newline
before spitting out data. I want it immediately.
Much in the same way $|=1 would give me data.
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Timothy Johnson" <[EMAIL
You'd probably have better luck using split.
open(INFILE,"foo.bar");
while(){
my @oneAtATime = split //,$_;
foreach $char(@oneAtATime){
do something...
}
}
-Original Message-
From: Agustin Rivera [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 5:08 PM
To: [EMAIL P
Hello All,
Just wondering how I would go about setting up the following hash and if
it would be wise to do it this way?
I have the following data...
$username $company $fullname $owing
I want to place all of this in a hash of a hash...
%name_of hash =
"Username1" => "Company
Is there anyway to change the Default Input Record Separator.. or $/ .. to
allow me to read a character at a time?
I tried$/=~ /./;but it doesn't work.
Thanks,
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
At 05:38 PM 3/25/02 -0600, subbu wrote:
> where IO::Pty is located in CPAN...?
> There is only IO::Tty..but IO::Pty is no avaiable..
Yes it is.
>in which other site can we locate..?
IO::Pty is part of the IO::Tty distribution. See
http://search.cpan.org/search?dist=IO-Tty.
--
Peter Scott
P
Hi Rune,
Try Robert Pepper's win32 perl tutorial. You will need ActivePerl from
ActiveState.
http://www.netcat.co.uk/Rob/perl/win32perltut.html
Alfred Vahau
Project Breeze
SNPS
---
Hi
I'm trying to learn perl. Are there any good resourc
Salute Franck,
1. To convert windows file to unix:
perl -pe 's/\xd\xa/\xa/g' < windowsfile > unixfile
2. To convert unix to windows
perl -ps 's/\xa/\xd\xa/g' < unixfile > windowsfile
Hope this is of some help
Alfred Vahau
Project Breeze
SNPS
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
From: "FORGHANI,BEHDAD (A-Spokane,ex1)" <[EMAIL PROTECTED]>
> I am trying to make a two dimentional array. I have a function that
> returns an array. The following code works:
>
> @x = f();
> push(@y, \@x);
>
> and then I can reference it @{@y[$i]}[$j};
You should write the code above like this
Dear all,
Thank you very much you guys who giving me so detailed ans. (@v@) /"
That's very very much helpful ^_^ And sorry for posted to the cgi groups as
my careless. ~.~
Anyway, I am trying to follow up on some question and plus some more.
3. Is this different for this 2 scripts ? ( Modified
> I am trying to make a two dimentional array. I have a
> function that returns an array. The following code works:
>
> @x = f();
> push(@y, \@x);
>
> and then I can reference it @{@y[$i]}[$j};
>
> Is this the best way to make two dimentional arrays; I.e.,
> using push and reference to arrays
> Is this the best way to make two dimentional arrays...
> ...and then I can reference it @{@y[$i]}[$j};
That is a little icky. You can access individual elements like this:
$y[0]->[1]
Or
$y[0][1]
> I was wondering if I can construct the array without a variable x.
> I tried:
> push(@y, \f
Hello,
I am trying to make a two dimentional array. I have a function that returns
an array. The following code works:
@x = f();
push(@y, \@x);
and then I can reference it @{@y[$i]}[$j};
Is this the best way to make two dimentional arrays; I.e., using push and
reference to arrays?
Also, I was
checkout perlre or do a search on regular expressions
-Original Message-
From: wahlstros [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:04 PM
To: John W. Krahn
Cc: [EMAIL PROTECTED]
Subject: Re: newbie question
where can i find a decent man page for understanding string patt
where can i find a decent man page for understanding string pattern matching
>>push @phone, /\s(\d+\s\d+\s\d+):/;
- Original Message -
From: "John W. Krahn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 2:53 PM
Subject: Re: newbie question
> Anidil Ra
Hi Bob,
thanks for the help.
I think $sock will be closed when it goes out of scope anyhow. I tried
removing that line and it didn't really have any effect.
As for forking in the client, it writes to the socket via one process and
reads from it via the other. Probably not necessary, but that's
Anidil Rajendran-Raj wrote:
>
> Firstname Lastname 650 156 7190:somfield:somefield:somefield
> Firstname Lastname 408 256 7290:somfield:somefield:somefield
> Firstname Lastname 510 3456 7390:somfield:somefield:somefield
>
> I have the above lines in a file and I am trying to create an array of =
Firstname Lastname 650 156 7190:somfield:somefield:somefield
Firstname Lastname 408 256 7290:somfield:somefield:somefield
Firstname Lastname 510 3456 7390:somfield:somefield:somefield
**more lines here ***
Firstname Lastname 415 3456 7390:somfield:somefield:somefield
I have
Hey, I think I know what are you talking about. and there are many ways
to do that..
Such as :
Write something like that in the body tag,
to pop a new window to done the logout job. and then use javascript to close
the window after the job done..
If you are trying to use time count
i have used
$need = param('dif') - $score.
i didin't know i could use params in a calc like that.
problem solved, cheers
On Monday 25 Mar 2002 6:38 pm, Dave Storrs wrote:
> Hi Matthew,
>
> First of all, subtracting scalars is perfectly valid, so the actual error
> must be something else. He
Here is a slightly modified version:
#!perl -w
use strict;
my @array = ; # use DATA so don't have to play with file
my @phone;
my $MyErrors = 0; # let me know if errors
foreach (@array) {
chomp; # remove linefeed
next if ( /^\s*$/ ); # if blank line b
> >> I have strings like the following one:
> >> my $s="The Library of >>
> >> I want to truncate the string, to become
> >> "The Library of ..."
> >> (that is remove 'unterminated' html tags - tags that open but
> >> there is no
> >> '>' at the end, and add "..." if necessary)
> >> ...
> >
>
Firstname Lastname 650 156 7190:somfield:somefield:somefield
Firstname Lastname 408 256 7290:somfield:somefield:somefield
Firstname Lastname 510 3456 7390:somfield:somefield:somefield
I have the above lines in a file and I am trying to create an array of =
phone numbers
open (FILE,"thefile") or
I would like to get some input from the general public on a few
issues with Mail::Sender.
1) Will anyone mind if the SendX() methods will return the
Mail::Sender object instead of the 1 they used to?
This would allow chaining the method calls like this :
eval {
(new Mail::
I learned Perl using "teach Yourself Perl in 21 Days" by David Till.
Then I grabbed the Perl Cookbook. That was enough for me to feel comfortable
in Perl and write some complex (for me) programs using anonymous array pointers
and so on.
Hope that helps.
Joe
-Original Message-
From: Timo
On Mar 25, [EMAIL PROTECTED] said:
>and a scalar like this
>$hostname = qx(/usr/ucb/hostname);
You'll want to chomp() $hostname! Output from the /usr/ucb/hostname
command probably has a newline at the end of it; you'll need to remove it.
>2. I want to be able to build a simple sub like this
On Mar 25, Franck FASANO said:
>I'm trying to eliminate characters control (Non editable by "vi" or non printable),
>null characters ... from a file .
Then use \p{IsCtrl} instead of \P{IsPrint}.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother
[EMAIL PROTECTED] (David Gray) wrote in
003401c1d41a$595140e0$[EMAIL PROTECTED]:">news:003401c1d41a$595140e0$[EMAIL PROTECTED]:
>> I have strings like the following one:
>> my $s="The Library of >
>> I want to truncate the string, to become
>> "The Library of ..."
>> (that is remove 'unterminat
Hi Matthew,
First of all, subtracting scalars is perfectly valid, so the actual error
must be something else. Here are three things you should check.
1) First, you don't have a semicolon at the end of that line.
2) Second, if you are operating under 'use strict', you will need to
predeclare yo
1. I want to be able to create a hostname => user hash table
like this
%hosts = (
sun1 => "bobby",
sun2 +> "ronald",
)
and a scalar like this
$hostname = qx(/usr/ucb/hostname);
2. I want to be able to build a simple sub like this
sub getname {
print $getname{$hostna
> -Original Message-
> From: David Samuelsson (PAC) [mailto:[EMAIL PROTECTED]]
> Subject: get full name of $user in NT?
>
>
> Is there anyway off getting the full name from an remote
> user? that is, i know the persons log on sign, say "ROMI"
>
> full name is "Robert Mitchum" accordin
From: "Patrice Boisieau" <[EMAIL PROTECTED]>
> In order to increase the time execution of a Perl script, I wonder if
> it is possible to reduce the time loading of a module at the
> compilation step. In particular, is the time loading reduced when just
> one of the symbols exported by the module i
Thank you very much for response.
I'm asking about expiring session, and I just know that Perl cann't do it.
I
imagined that the solution was Javascript. The question is as I can do it.
Luis Guillot
> - Original Message -
> From: "Hanson, Robert" <[EMAIL PROTECTED]>
> To: "'Luis
There's a lot more to it than that, there is no real concept of "connected"
when you talk about Web apps and HTTP. In *general* a browser will connect
to a web server, grab a single page (or image), then disconnect. When the
user clicks a link it connects again, gets the one page, and disconnect
I would like that an user that is connected to my web page it was
disconnected when closing the navigator or when visiting another web,
without having to press a logout button. Is it possible with Perl? Which
module or like I can do it?
Thank you very much.
Luis Guillot
> I have strings like the following one:
> my $s="The Library of
> I want to truncate the string, to become
> "The Library of ..."
> (that is remove 'unterminated' html tags - tags that open but
> there is no
> '>' at the end, and add "..." if necessary)
>
> By using the following:
> $s=~s/<(
slight correction, one variable is a passed param but the others is
retirieved from a database with DBI.
On Monday 25 Mar 2002 3:41 pm, Hanson, Robert wrote:
> Look at CGI.pm for grabbing form data...
>
> use CGI qw/:standard/;
>
> my $diff = param('val1') - param('val2');
>
> Rob
>
> -Origi
Hi,
I am writing a parser using Perl. I am trying to determine the best way to
do a search for a word in a datafile. Currently I am using the filehandle
to do this however I will need a different method as my search invloves
knowing the text in other lines. Does anyone have any suggestions?
T
Look at CGI.pm for grabbing form data...
use CGI qw/:standard/;
my $diff = param('val1') - param('val2');
Rob
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 9:20 AM
To: [EMAIL PROTECTED]
Subject: arithmetic operators
in short, how ca
As for the PerlBuilder part, I've been using it for a while, and I consider
it a worthwhile investment, but if you're not using Perl on a regular basis
yet, it might be a bit expensive. The mouse-over bracket matching is
especially useful for beginners.
As for resources, try searching for Perl
Hi
I'm trying to learn perl. Are there any good resources on the net where I can begin??
What software do I need? I have downloaded an evaluation version of PerlBuilder: Is
this any good?
Thanks for any help...
Rune
in short, how can i take 2 values from params passed to the script in a
form, and get a third variable from subtracting the first 2?
--
Matthew Harrison
Internet/Network Services Administrator
Peanut-Butter Cheesecake Hosting Services
Genstate
www.peanutbuttercheesecake.co.uk
--
To unsubscrib
Hello all...
I have strings like the following one:
my $s="The Library of Library of ..."
(that is remove 'unterminated' html tags - tags that open but there is no
'>' at the end, and add "..." if necessary)
By using the following:
$s=~s/<(?!.*?>)//;
I only get a removal of the non-matching '<'
Hi,
I'm trying to eliminate characters control (Non editable by "vi" or non printable),
null characters ... from a file .
I try something like this :
perl -pi -e 's%\P{IsPrint}%%g' MyFile
But it delete the new line "\n" and the space "\s" too ...
How can I do to eliminate only the noise ?
An
You can use the Use::Telnet(); function.. .
Here's a snippit of code:
$t = new Net::Telnet (Timeout => 10,
Prompt => '/[>]$/',
Errmode => "return" );
$t->open("$hostname.db");
if ($t->login($username, $passwd) ) {
@lines = $t->cmd("
Is there anyway off getting the full name from an remote user? that is, i know the
persons log on sign, say "ROMI"
full name is "Robert Mitchum" accordin to NT. Is there any Perl code , that you know
off? i have checked the Win32::AdminMisc functions, and that seems to return, nothing
or numbe
Hey zentara,
My MUA believes you used (X-Mailer not set)
to write the following on Sunday, March 24, 2002 at 9:08:02 AM.
z> On Sun, 24 Mar 2002 03:31:17 -0800, [EMAIL PROTECTED] (Gary Hawkins)
z> wrote:
>>Is there a way to set up for starting a CMD window using a right click within
>>that folder
hi to all..
where IO::Pty is located in CPAN...?
There is only IO::Tty..but IO::Pty is no avaiable..
in which other site can we locate..?
please reply..
regards
keshav
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
thanq Mr sudharsan,
but can we use only Expect module to do that..
pl reply
regards
keshav
- Original Message -
From: Sudarsan Raghavan <[EMAIL PROTECTED]>
To: subbu <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 1:54 AM
Subject: Re: telnet...???
> Take a lo
> how to write a program that user changes to
> any user-specified directory on a machine
> using any of modules...
perldoc -f chdir
Jonathan Paton
__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Musi
Subject: Fw: perl..changing directory
hi,
how to write a program that user changes to any user-specified directory on
a machine ..using any of
modules..or otherthan
regards
keshav
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hi,
i am trying to write a program that changes to any user-specified directory on a
machine ..
regards
keshav
Take a look at Net::Telnet on cpan
subbu wrote:
> hi to all..
> can we use perl expect module to telnet to a specified
> machine and to execute a specified command on a
> remote machine..?
>
> regards
> keshav
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMA
hi to all..
can we use perl expect module to telnet to a specified
machine and to execute a specified command on a
remote machine..?
regards
keshav
Here's the 'manual'
http://www.perldoc.com/perl5.6.1/lib/CGI.html
probably a little easier than trying to read the .pm file.
Print it out and keep it next to your keyboard at all times :)
--
>From: Tor Hildrum <[EMAIL PROTECTED]>
>To: Perl <[EMAIL PROTECTED]>
>Subject: Re: Might be
84 matches
Mail list logo