Hi,
Can somebody please help.
Regards
Irfan.
-Original Message-
From: Irfan J Sayed (isayed)
Sent: Friday, August 22, 2008 11:12 AM
To: 'Stewart Anderson'; beginners@perl.org
Subject: RE: doubt in code
Agree, but where is the file name??
$server will just store the server name right?
John W. Krahn wrote:
If you consider this to be simpler:
my $value = $t1lsq{ $interfaceName } > 4 ? 4 : $t1lsq{ $interfaceName };
Oh, yes, of course! Opps, ignore my suggested line of code... :-)
Ray
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PR
Noah wrote:
Hi there,
Hello,
Is there a way to simplify the following to one line?
my $value = $t1lsq{$interfaceName};
$value = 4 if $value > 4;
If you consider this to be simpler:
my $value = $t1lsq{ $interfaceName } > 4 ? 4 : $t1lsq{ $interfaceName };
John
--
Perl isn't a to
Agree, but where is the file name??
$server will just store the server name right?
Regards
Irf
-Original Message-
From: Stewart Anderson [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2008 8:25 PM
To: beginners@perl.org
Cc: Stewart Anderson
Subject: RE: doubt in code
> -Orig
Hi Anjan,
ANJAN PURKAYASTHA wrote:
shawn,
thanks for the pointers.
looks like you have saved me from buying more disks ;)!
anjan
A bit too late, but another option is to compress the input file using
gzip and then read it in a line at a time and decompress in-memory.
Then, write it out
Hi Noah,
The ?: operator would do the trick:
http://www.perl.com/doc/manual/html/pod/perlop.html#Conditional_Operator
I think what you need would be this, but I haven't tried it:
(my $value > 4) ? ($value = 4) : ($value = $t1lsq{$interfaceName});
Ray
Noah wrote:
Hi there,
Is there a
Hi there,
Is there a way to simplify the following to one line?
---
my $value = $t1lsq{$interfaceName};
$value = 4 if $value > 4;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Thu, Aug 21, 2008 at 1:08 PM, Periklis <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have the following problem:
> Trying to install a module through the CPAN utility, I got an error message
> of not having the right to acces some directories and the installation failed.
>
> My question is how sho
Rob Dixon wrote:
ANJAN PURKAYASTHA wrote:
while (){
while (<$in>) {
chomp;
process line here
write OUT ("$abcd\n");
There is no write function.
I beg to differ:
perldoc -f write
write FILEHANDLE
write EXPR
write Writes a formatted record (possibly multi-line) to th
Hi Rob,
H, true -- I may be adding and adding code unnecessarily...
What the forked process does is run a C++ program and it is that program
that needs to be timed. Would the code below accomplish that? I mean,
having "times" in the Perl script that calls that C++ program will give
th
From: "Dr.Ruud" <[EMAIL PROTECTED]>
"Octavian Rasnita" schreef:
Dr.Ruud:
Octavian Rasnita:
but the problem is that the primary key field which has
autoincrement option skips the ID of each record which is not
inserted because it is already in the database, and I don't want
that.
This skip
sanket vaidya wrote:
>
> When I run makefile .pl while installing Parl::Packer 0.982. I
> get this message.
>
> Fetching 'PAR-Packer-0.982-MSWin32-x86-multi-thread-5.10.0.par' from
> www.cpan.org... Fetching failed: No compiler found, won't generate
> 'script/parl.exe'! ...
>
> So I
shawn,
thanks for the pointers.
looks like you have saved me from buying more disks ;)!
anjan
On Thu, Aug 21, 2008 at 3:40 PM, Mr. Shawn H. Corey <[EMAIL PROTECTED]>wrote:
> On Thu, 2008-08-21 at 15:23 -0400, ANJAN PURKAYASTHA wrote:
> > ok here is the problem. i have a limited amount of memory.
Raymond Wan wrote:
>
> Thank you very much for your reply! I've actually been stuck on this
> for a while...but with little knowledge about forking processes, I was a
> quite stuck.
>
> John W. Krahn wrote:
>> perldoc -f times
>
> Ah, didn't know about that. I thought to get user time, you h
Jim wrote:
>
> I have solved the problem!
>
> Thank you for your time.
It would be good if you could explain your solution. This is a list for teaching
Perl, not just for finding solutions to individual's problems. If you publish
your working code it may well help someone else and you would also
ANJAN PURKAYASTHA wrote:
>
> ok here is the problem. i have a limited amount of memory.
>
> i need to open a large file (~600 megs). i have to open a filehandle, read
> and process each line and write the output result into another file (which
> soon grows to about 300 megs.
> so,
Always
use s
On Thu, 2008-08-21 at 15:23 -0400, ANJAN PURKAYASTHA wrote:
> ok here is the problem. i have a limited amount of memory.
>
> i need to open a large file (~600 megs). i have to open a filehandle, read
> and process each line and write the output result into another file (which
> soon grows to about
"Jenda Krynicky" schreef:
> Dr.Ruud:
>> Amit Saxena:
>>> I want to know the best approach that should be used to find the
>>> extra curly brace when any Perl program aborts with the error
>>> message as "Missing right curly braces".
>>
>> Many editors have a function to bring your cursor from the
ok here is the problem. i have a limited amount of memory.
i need to open a large file (~600 megs). i have to open a filehandle, read
and process each line and write the output result into another file (which
soon grows to about 300 megs.
so,
open (IN, "averylargefile");
open (OUT, "anotherveryla
On Thu, 21 Aug 2008 08:35:28 -0700, Jyotishmaan Ray wrote:
>
> Let me try out till I received a reply from your end.
>
> At first what i did was manually created the a dir using
>
> mkdir s08-1-5-097
>
> then
>
> i typed
>
> id s08-1-5-097
>
> And then typed the command:-
>
> chown 3053:3
On Thu, 21 Aug 2008 17:48:00 +0530, Amit Saxena wrote:
>> Load the code into Emacs. Ensure cperl-mode is enabled. Mark the whole
>> buffer (control-space at the beginning, then move point to the end).
>> Execute M-x indent-region, Look to see where the indentation goes "off".
>>
> How can we ena
simple - that did it. of course I removed the "my" when defining
$templateConfiguation in the for loop.
thanks!
Raymond Wan wrote:
Hi Noah,
Would defining $templateConfiguration outside of the for loop be
sufficient for what you need?
i.e.,
my $templateConfiguation;
foreach my $templat
Hi all,
I have the following problem:
Trying to install a module through the CPAN utility, I got an error message of
not having the right to acces some directories and the installation failed.
My question is how should I proceed?
-- should I rerun CPAN and give it administrative rights? e.g. sud
Jyotishmaan Ray wrote:
>
> Wolf, that comes later, now i have to find out the solution of this problem.
> Any pointers ??
This is not a Perl problem as has been said several times. Since you don't even
have the courtesy to bottom-post your responses as requested I am not inclined
to help you furt
Wolf, that comes later, now i have to find out the solution of this problem.
Any pointers ??
--- On Thu, 8/21/08, Wolf <[EMAIL PROTECTED]> wrote:
From: Wolf <[EMAIL PROTECTED]>
Subject: Re: What is wrong with this script ??
To: [EMAIL PROTECTED]
Cc: beginners@perl.org
Date: Thursday, Augus
Take some SYS Admin classes.
Once you have completed the training, your questions should have answers.
Wolf
Jyotishmaan Ray <[EMAIL PROTECTED]> wrote:
>
> Dear Wolf
>
> It still has not solved my problem completely,
>
> The output is shown below :-
> drwxr-xr-x 2 s08-1-5-095 3051 4096
Dear Wolf
It still has not solved my problem completely,
The output is shown below :-
drwxr-xr-x 2 s08-1-5-095 3051 4096 2008-08-21 20:57 s08-1-5-095
drwxr-xr-x 2 s08-1-5-096 3052 4096 2008-08-21 20:57 s08-1-5-096
drwxr-xr-x 2 s08-1-5-097 3053 4096 2008-08-21 20:57 s08-1-5-097
The group w
Dear Wolf,
Thaks a lot for opening my eyes. Finally i have found out the solution it workd
fine, manuallu as you said, i referred the man pages of chown and did it
manually.
The next thing is to test it through a script and finally run the script in the
cluster server to do the job.
Thank
> -Original Message-
> From: Irfan J Sayed (isayed) [mailto:[EMAIL PROTECTED]
> Sent: 21 August 2008 15:49
> To: beginners@perl.org
> Subject: doubt in code
>
> Hi All,
>
> I have sample code like this:
>
> #!/usr/bin/perl
>
> # file: lgetr.pl
>
> # Figure 1.2: Read the first line fro
Hi All,
I have sample code like this:
#!/usr/bin/perl
# file: lgetr.pl
# Figure 1.2: Read the first line from a remote server
use IO::Socket;
my $server = shift;
my $fh = IO::Socket::INET->new($server);
my $line = <$fh>;
print $line;
As per comment it says that, it prints the first line
Jyotishmaan Ray <[EMAIL PROTECTED]> wrote:
>
> No it does nt work out as shown below:-
>
>
> [EMAIL PROTECTED] perl]# chown s08-1-5-095:s08-1-5-095 /root/perl/s08-1-5-095
> chown: `s08-1-5-095:s08-1-5-095': invalid group
> [EMAIL PROTECTED] perl]# chown $s08-1-5-095:$s08-1-5-095
> /root/p
On Wed, Aug 20, 2008 at 7:37 AM, Ed <[EMAIL PROTECTED]> wrote:
> Howdy all!
>
> As part of a test script, I have to make sure my test machine (i.e.
> the machine that is running the script) has libraries zlib and hdf5. I
> do that with this code. Is there a better way?
>
[snip]
>
> Any comments app
No it does nt work out as shown below:-
[EMAIL PROTECTED] perl]# chown s08-1-5-095:s08-1-5-095 /root/perl/s08-1-5-095
chown: `s08-1-5-095:s08-1-5-095': invalid group
[EMAIL PROTECTED] perl]# chown $s08-1-5-095:$s08-1-5-095 /root/perl/s08-1-5-095
[EMAIL PROTECTED] perl]# chown $s08-1-5-095:$s08-
Hello Perry,
Thanks a lot for replying my mail again.
Please find the answers of your questions below one by one.
--- On Thu, 8/21/08, Perry Smith <[EMAIL PROTECTED]> wrote:
From: Perry Smith <[EMAIL PROTECTED]>
Subject: Re: What is wrong with this script ??
To: [EMAIL PROTECTED]
Cc: "M
try using:
chown $id:$gid $dir
so that it would be
chown 3051:3051 /home/users/s01-5-097 (or whatever)
HTH,
Wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello Perry,
Thanks a lot for replying my mail again.
Please find the answers of your questions below one by one.
--- On Thu, 8/21/08, Perry Smith <[EMAIL PROTECTED]> wrote:
From: Perry Smith <[EMAIL PROTECTED]>
Subject: Re: What is wrong with this script ??
To: [EMAIL PROTECTED]
Cc: "Mr
Temple wrote:
>
> I have some experience with ruby watir
>
> (http://wtr.rubyforge.org/)
>
> I plan to try LWP of Perl. I bought this book
>
> http://oreilly.com/catalog/9780596001780/
>
> Inside it are full of Mozilla and Internet explore.
>
> I dont know at what date firefox released
> but Is F
From: "Dr.Ruud" <[EMAIL PROTECTED]>
> "Amit Saxena" schreef:
>
> > I want to know the best approach that should be used to find the
> > extra curly brace when any Perl program aborts with the error message
> > as "Missing right curly braces".
>
> Many editors have a function to bring your cursor
I have solved the problem!
Thank you for your time.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Thu, 2008-08-21 at 17:46 +0530, Amit Saxena wrote:
> I am using "vi" on Solaris.
>
> I can also use "%" in command mode for "vi" to match parenthesis and curly
> braces. However this approach results in lots of matching open brace against
> the close one etc when majority of the lines in the co
Jim schreef:
> Given a wordlist @WordList and a file $content,
> how do I construct a regexp to search for every
> word in @WordList in $content.
>
> I have tried the following, which does not work:
>
> foreach $i (@WordList)
> {
> print "Searching: " . $i . "\n\n";
> if($content =~ m/$i/)
>
"Octavian Rasnita" schreef:
> Dr.Ruud:
>> Octavian Rasnita:
>>> but the problem is that the primary key field which has
>>> autoincrement option skips the ID of each record which is not
>>> inserted because it is already in the database, and I don't want
>>> that.
>>
>> This skip is normal in a mu
"Amit Saxena" schreef:
> I am using "vi" on Solaris.
>
> I can also use "%" in command mode for "vi" to match parenthesis and
> curly braces. However this approach results in lots of matching open
> brace against the close one etc when majority of the lines in the
> code contains curly braces (thr
From: "Dr.Ruud" <[EMAIL PROTECTED]>
"Octavian Rasnita" schreef:
but the problem is that the primary key field which has autoincrement
option skips the ID of each record which is not inserted because it
is already in the database, and I don't want that.
This skip is normal in a multi-connecti
Hi all,
Given a wordlist @WordList and a file $content, how do I construct a
regexp to search for every word in @WordList in $content.
I have tried the following, which does not work:
foreach $i (@WordList)
{
print "Searching: " . $i . "\n\n";
if($content =~ m/$i/)
{
2008/8/21 Marc van Driel <[EMAIL PROTECTED]>:
> Hope you enjoy it! I know the author appreciates feedback :)
>
> Cheers
>
> Raymond Wan schreef:
>>
>> Hi Marc,
>>
>> Yes, it seems we were both right :-). From Dermot's first post, I guess
>> he was asking about Perl interfacing an IR system and why
On Thu, Aug 21, 2008 at 5:23 PM, Peter Scott <[EMAIL PROTECTED]> wrote:
> On Thu, 21 Aug 2008 14:31:07 +0530, Amit Saxena wrote:
> > Assuming you are getting the buggy code for the first time and you need
> to
> > track which line contains that curly brace which is causing that problem,
> > what y
On Thu, Aug 21, 2008 at 2:44 PM, Stewart Anderson <
[EMAIL PROTECTED]> wrote:
>--
>
> *From:* Amit Saxena [mailto:[EMAIL PROTECTED]
> *Sent:* 21 August 2008 10:01
> *To:* Stewart Anderson
> *Cc:* Perl
> *Subject:* Re: About the error message in Perl : "Missing right
On Thu, 21 Aug 2008 14:31:07 +0530, Amit Saxena wrote:
> Assuming you are getting the buggy code for the first time and you need to
> track which line contains that curly brace which is causing that problem,
> what your modified approach be ?
Load the code into Emacs. Ensure cperl-mode is enabled
AFAIK, LWP allows you to write web clients, for fetching data off the
WWW. I think your browser choice is not relevent.
Jim
On Aug 20, 4:26 pm, [EMAIL PROTECTED] (Temple) wrote:
> Hello Perl users,
> I have some experience with ruby watir
> (http://wtr.rubyforge.org/)
> I plan to try LWP of Perl.
Hi Dermont/Ray,
Please check out the MRS system (mrs.cmbi.ru.nl). It has a SOAP
interface to perl and other languages, and is extremely fast in indexing
and retrieval. MRS is a generic tool and you can index yourself, but
also dowload indexed bio-databanks. The source code is in C++ and is
av
Dermot schreef:
> This is a slighty OT query.
>
> I am looking for a text search engine that has a Perl interface. I
> have found a few, Lucene, OpenFTS and Swish-E. OpenFTS hasn't had a
> release of the last 3 years. That makes me nervous about using it.
> Lucene is java based. I have zero java
"Octavian Rasnita" schreef:
> but the problem is that the primary key field which has autoincrement
> option skips the ID of each record which is not inserted because it
> is already in the database, and I don't want that.
This skip is normal in a multi-connection environment. You allocate the
ne
"Amit Saxena" schreef:
> I want to know the best approach that should be used to find the
> extra curly brace when any Perl program aborts with the error message
> as "Missing right curly braces".
Many editors have a function to bring your cursor from the opening to
the closing brace.
--
Affijn
_
From: Amit Saxena [mailto:[EMAIL PROTECTED]
Sent: 21 August 2008 10:01
To: Stewart Anderson
Cc: Perl
Subject: Re: About the error message in Perl : "Missing right curly
braces"
On Thu, Aug 21, 2008 at 2:23 PM, Stewart Anderson
<[EMAIL PROTECTED]> wrote:
> -Original Message-
On Thu, Aug 21, 2008 at 2:23 PM, Stewart Anderson <
[EMAIL PROTECTED]> wrote:
>
> > -Original Message-
> > From: Amit Saxena [mailto:[EMAIL PROTECTED]
> > Sent: 21 August 2008 08:56
> > To: Perl
> > Cc: Amit Saxena
> > Subject: About the error message in Perl : "Missing right curly
> brace
> -Original Message-
> From: Amit Saxena [mailto:[EMAIL PROTECTED]
> Sent: 21 August 2008 08:56
> To: Perl
> Cc: Amit Saxena
> Subject: About the error message in Perl : "Missing right curly
braces"
>
> Hi all,
>
> I want to know the best approach that should be used to find the extra
>
2008/8/21 Raymond Wan <[EMAIL PROTECTED]>:
>
> Hi Dermot,
>
> Off-topic, so I hope no one minds if I reply.
>
> Perl is good at manipulating text strings, but that doesn't usually help
> search engine implementations. A search engine (or information retrieval
> system) has to be fast and after it
I would first verify that you can do what you need to do with one
individual directory from the shell. i.e. make sure you can chown,
chgrp, and chmod -- what ever other commands you are needing to do.
What kind of system is this anyway? That would help me a bit.
I suppose, there is a chanc
Hello Perl users,
I have some experience with ruby watir
(http://wtr.rubyforge.org/)
I plan to try LWP of Perl.
I bought this book
http://oreilly.com/catalog/9780596001780/
Inside it are full of Mozilla and Internet explore.
I dont know at what date firefox released
but
Is Firefox 3.0 applicable
Hi all,
I want to know the best approach that should be used to find the extra curly
brace when any Perl program aborts with the error message as "Missing right
curly braces".
Though the error message is simple enough to suggest that there is an extra
curly brace in the Perl program, but it speci
It hasn't had a release for a few years either but I've successfully used
Plucene to build a search engine for inhouse mailing lists.
http://search.cpan.org/dist/Plucene/
-J
--
On Wed, Aug 20, 2008 at 09:46:42PM +0100, Dermot wrote:
> Hi,
>
> This is a slighty OT query.
>
> I am looking for a
Hi Jyotishmaan,
Jyotishmaan Ray wrote:
Give some pointers as such to sort out this problem in my cluster servers
(fedora-linux) ?
As a suggestion, it sounds to me that your problem is not related to
Perl and perhaps you're asking the wrong mailing list. All Perl can do
for you is take
Hi,
From: "Rob Dixon" <[EMAIL PROTECTED]>
Since this is a Perl forum it is helpful to use the /full syntax/ of any
SQL
that your Perl is using. (I assume you actually have some Perl behind all
this?) And in particular you should avoid abbreviating non-standard SQL,
so
that at least we have s
On Wed, Aug 20, 2008 at 12:07:02PM -0700, Jyotishmaan Ray wrote:
>
Depending on the Linux system's policies, executing a command like this:
useradd -m -d /mnt/btech -c $encrypted_password -s $shell $user
will:
- create the UID in the password database
- create a group ID in /etc/groups
- ad
On Aug 20, 10:54 am, [EMAIL PROTECTED] (Arun) wrote:
> Hi,
> I just wanted small help here, i want to repeat an array for every
> 30 seconds.
> lets us keep i want to send an array for every 30 seconds and also
> should be able to quit as per the user.
Hi Arun,
You can use 'sleep' to achive
Howdy all!
As part of a test script, I have to make sure my test machine (i.e.
the machine that is running the script) has libraries zlib and hdf5. I
do that with this code. Is there a better way?
if ($opt{netcdf4} && ! -e $install_file) {
copy("/upc/share/ed/downloads/zlib-$
Give some pointers as such to sort out this problem in my cluster servers
(fedora-linux) ?
--- On Thu, 8/21/08, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote:
From: Mr. Shawn H. Corey <[EMAIL PROTECTED]>
Subject: Re: What is wrong with this script ??
To: "Perry Smith" <[EMAIL PROTECTED]>
Cc: [
68 matches
Mail list logo