On Tue, 10 Jan 2006, jcht_mck wrote:
> I wanted to print if it matches my range of IP's. I thought I could use the
> (#..#) and it would work, but it didn't:
>
> #!/usr/bin/perl -nlw
>
> # Print if Ip's are in
> # 111.9.1-18.### or
> # 111.9.20-100.###
> # range
> #
> my $a="1-18";
> my $b="2
On 1/10/06, Gerald Wheeler <[EMAIL PROTECTED]> wrote:
> Running Perl 5.6.1 on Solaris 9 (Unix) SPARC
>
> Trying to install a (actually any ) module e.g., CPAN (upgrade), MD5,
> XML::XSLT, etc.. using: perl -MCPAN -e shell
>
> I do not have access to a "C" compiler, etc...
You should be able to in
I wanted to print if it matches my range of IP's. I thought I could use the
(#..#) and it would work, but it didn't:
#!/usr/bin/perl -nlw
# Print if Ip's are in
# 111.9.1-18.### or
# 111.9.20-100.###
# range
#
my $a="1-18";
my $b="20-100";
while (<>)
{
chomp $_;
next if ($_ eq "");
My bad I didn't frame my question well.
My idea is to accept users input for a perl script i have from GUI like a
window or frame ...
I understand both CGI & TK can help me do that. Please see if you can help
me understand which is easy & best way to do it
also any pointers to some examles for CG
I wanted to print if it matches my range of IP's. I thought I could use the
(#..#) and it would work, but it didn't:
#!/usr/bin/perl -nlw
# Print if Ip's are in
# 111.9.1-18.### or
# 111.9.20-100.###
# range
#
my $a="1-18";
my $b="20-100";
while (<>)
{
chomp $_;
next if ($_ eq "");
On Wed, 11 Jan 2006, manoj thakur wrote:
> My question is what is the best way to have the input to my perl script
> through a GUi like a form or a window.
> I know may be CGI any input to point me in the right direction is highly
> appreciated.
Read the documentation for CGI.pm, then write a pro
Hi All,
My question is what is the best way to have the input to my perl script
through a GUi like a form or a window.
I know may be CGI any input to point me in the right direction is highly
appreciated.
The idea is not to give the command line arguments as input to perl rather
filling them from
On 1/10/06, David Gama Rodríguez <[EMAIL PROTECTED]> wrote:
> I made a module that loads when Apache starts, in my module I declare a
> hash as a global in order to be accesed in any place in my module,
>
> my $hash;
Not to be picky about terminology, but a "my" variable is a lexical
variable, n
On 1/10/06, Steve Bertrand <[EMAIL PROTECTED]> wrote:
> Just to ensure the most efficient possible run, I've been doing tests
> with benchmark.
Hey, this is no place for empirical evidence! :-)
> Benchmark: running a, b, each for at least 10 CPU seconds...
> a: 11 wallclock secs (10.59
Hi All
I am trying to come up with a way of automating Soraris packages through my
perl script.
The problem I am having is that in the middle off the package install I get
asked to overwrite a bunch of files. What I am not sure of is how to capture
the response and then send an answe
The Ghost am Dienstag, 10. Januar 2006 21.57:
> I want to pull some text from a database:
>
> RxNumber in (select RxNumber FROM restoreReports WHERE Status in
> $Status)
>
> then I want perl to use this string and interpolate the variables
> ($Status).
>
> so:
>
> my $Status= "('New','Old')";
> my
Dan Huston am Dienstag, 10. Januar 2006 21.40:
> Greetings --
>
> I am reading text sql commands) from a file, chopping it into sections
> and then writing each section out to a different file. Within the text
> are perl variables that I had expected to be interpolated as they were
> written out to
John Doe:
> Vincent Li:
>>if (/$string/) {
>> s/$_/#$_/;
>
> Eventually it is faster just to handle the beginning of the line
> with s/^./#./
ITYM: s/^/#/
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional command
Vincent Li am Dienstag, 10. Januar 2006 19.59:
> Hi List:
Hi Vincent
> I have two files like this:
>
> file1:
> score CN_SUBJ_PROMOTE3.100 # [0.000..3.100]
> score CN_SUBJ_PROMOTION 3.600 # [0.000..3.600]
> score CN_SUBJ_PROVIDE3.000 # [0.000..3.000]
>
Robert Hicks:
> I have an application log that shows the "time", "id" and "type" for
> a user logging in. A short except looks like this:
>
> 19/12/2005 07:28:37 User (guest) logging in from (LIMS-CIT) -
> Assigned Userno (7045)
> 19/12/2005 07:32:06 User (guest) logging in from (LIMS-CIT) -
> A
Raoul Ripmeester schreef:
> How can I make the split to work with one or multiple space.
What you aim for, is already the default behaviour of split.
perldoc -f split
"If PATTERN is also omitted, splits on whitespace (after
skipping any leading whitespace). [...]
As a special case, specifyin
Steve Bertrand am Dienstag, 10. Januar 2006 18.24:
> Hi all,
Hi Steve
> I've a project on the go, where I must compare a single field of more
> than 3 million database records, then sort them largest to smallest. The
> field will contain up to a 6 digit integer.
(I think you must have a reason n
Try changing your $Status variable to this:
my $Status = '(' . '"' . join('","','New','Old') . '"' . ')';
that should give the results desired
hope it helps.
The Ghost wrote:
I want to pull some text from a database:
RxNumber in (select RxNumber FROM restoreReports WHERE Status in $Status)
Robert Hicks am Dienstag, 10. Januar 2006 18.16:
> I have an application log that shows the "time", "id" and "type" for a user
> logging in. A short except looks like this:
>
> 19/12/2005 07:28:37 User (guest) logging in from (LIMS-CIT) - Assigned
> Userno (7045)
> 19/12/2005 07:32:06 User (guest
Running Perl 5.6.1 on Solaris 9 (Unix) SPARC
Trying to install a (actually any ) module e.g., CPAN (upgrade), MD5,
XML::XSLT, etc.. using: perl -MCPAN -e shell
I do not have access to a "C" compiler, etc...
The errors shown below occurred for every module I attempt to install..
(below is just
Ryan,
Yes thank you that works and did the trick.
Kind regards,
Raoul.
On Tue, 2006-01-10 at 16:48 -0500, Ryan Frantz wrote:
>
> > -Original Message-
> > From: Raoul Ripmeester [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 10, 2006 4:48 PM
> > To: beginners@perl.org
> > Subject
On Tue, Jan 10, 2006 at 10:47:50PM +0100 or thereabouts, Raoul Ripmeester wrote:
> Hello all,
>
> I am a newbe so please bare with me :
>
> I am trying to split lines of a file into variables so I can do some
> sorting and other stuff with this. Now my script is working but the
> split is giving
> -Original Message-
> From: Raoul Ripmeester [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 10, 2006 4:48 PM
> To: beginners@perl.org
> Subject: Splitting file
>
> Hello all,
Hello,
>
> I am a newbe so please bare with me :
>
> I am trying to split lines of a file into variable
Hello all,
I am a newbe so please bare with me :
I am trying to split lines of a file into variables so I can do some
sorting and other stuff with this. Now my script is working but the
split is giving me problems. I am splitting on the space character, but
the line(s) can contain multiple spaces
I want to pull some text from a database:
RxNumber in (select RxNumber FROM restoreReports WHERE Status in
$Status)
then I want perl to use this string and interpolate the variables
($Status).
so:
my $Status= "('New','Old')";
my $sql=get_SQL_String(); #will get 'RxNumber in (select RxNum
Greetings --
I am reading text sql commands) from a file, chopping it into sections
and then writing each section out to a different file. Within the text
are perl variables that I had expected to be interpolated as they were
written out to the new file but they are not.
Here is a sample lin
Tom Phoenix said:
> On 1/10/06, Scott Taylor <[EMAIL PROTECTED]> wrote:
>
>> I'm trying to compile DateTime module for Perl in SCO OSR5.07 and
>> failing
>> miserably.
>
>> # Error: Can't locate loadable object for module DateTime in @INC
>
> It looks as if something failed long before this p
I think that a fresh new copy of the module is loaded into memory everytime it
is called. That's why your module loses its value. If I want to do something
like that, I'd consider storing the value on the hard drive somewhere.
Vishal
Quoting David Gama Rodríguez <[EMAIL PROTECTED]>:
> Hello ev
Hi List:
I have two files like this:
file1:
score CN_SUBJ_PROMOTE3.100 # [0.000..3.100]
score CN_SUBJ_PROMOTION 3.600 # [0.000..3.600]
score CN_SUBJ_PROVIDE3.000 # [0.000..3.000]
file2:
CN_SUBJ_PROMOTE
CN_SUBJ_PROMOTION
If string CN_SUBJ_PROMOTE exi
On 1/10/06, Scott Taylor <[EMAIL PROTECTED]> wrote:
> I'm trying to compile DateTime module for Perl in SCO OSR5.07 and failing
> miserably.
> # Error: Can't locate loadable object for module DateTime in @INC
It looks as if something failed long before this point, during the
build process.
Hello everyone !!
I'm really a newbie developing perl modules. I have and issue
I made a module that loads when Apache starts, in my module I declare a
hash as a global in order to be accesed in any place in my module,
my $hash;
sub x{
$foo = shift;
..
..
$hash->{x} = $foo;
}
sub
Tom Phoenix said:
> On 1/10/06, Scott Taylor <[EMAIL PROTECTED]> wrote:
>
>> I'm trying to compile DateTime module for Perl in SCO OSR5.07 and failing
>> miserably.
>
>> # Error: Can't locate loadable object for module DateTime in @INC
>
> It looks as if something failed long before this poi
Hi all,
I've a project on the go, where I must compare a single field of more
than 3 million database records, then sort them largest to smallest. The
field will contain up to a 6 digit integer.
Just to ensure the most efficient possible run, I've been doing tests
with benchmark.
I'll post the r
I have an application log that shows the "time", "id" and "type" for a user
logging in. A short except looks like this:
19/12/2005 07:28:37 User (guest) logging in from (LIMS-CIT) - Assigned
Userno (7045)
19/12/2005 07:32:06 User (guest) logging in from (LIMS-CIT) - Assigned
Userno (1959)
19/12/
BTW, I originally tried installing it through perl -MCPAN -e shell
always running installs as root.
Scott Taylor said:
>
> Hello all,
>
> I'm trying to compile DateTime module for Perl in SCO OSR5.07 and failing
> miserably.
>
> I have no idea what these errors mean. Can anyone tell me what I n
Hello all,
I'm trying to compile DateTime module for Perl in SCO OSR5.07 and failing
miserably.
I have no idea what these errors mean. Can anyone tell me what I need, or
what I'm doing wrong?
All tests in the "make test" are failing with messages like this one:
PERL_DL_NONLAZY=1 /usr/
dos2unix :)
> open in VIM
>
> nd write
>
> %s/^m//
>
> it will remove all the ^m in vim
>
> Cheers
> Manoj
>
>
>
> From: swayam panda [mailto:[EMAIL PROTECTED]
> Sent: Mon 1/9/2006 5:22 PM
> To: [EMAIL PROTECTED]; beginners@perl.org
> Subject: Re: ^M
>
>
>
> Hi.
>
>
John Doe am Dienstag, 10. Januar 2006 15.06:
> [EMAIL PROTECTED] am Dienstag, 10. Januar 2006 14.08:
> > I'm new to Perl and am trying to set a variable length byte array that is
> > passed to a socket as a string for output. I have the following which
> > works, but the commented out code doesn't.
[EMAIL PROTECTED] schreef:
What the others wrote, and:
> my $sock = new IO::Socket::INET( PeerAddr => '10.10.2.141', PeerPort
> => '5', Proto => 'udp' );
> die "no socket\n" unless $sock;
my $sock = new IO::Socket::INET( PeerAddr => '10.10.2.141'
, Pee
Grant Jacobs wrote:
Item: Obtaining complete Unix command line that evoked script as a string
use Unix::PID;
my $pid = Unix::PID->new();
print 'The kernel says I am: ' . $pid->get_command($$);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<
[EMAIL PROTECTED] am Dienstag, 10. Januar 2006 14.08:
> I'm new to Perl and am trying to set a variable length byte array that is
> passed to a socket as a string for output. I have the following which
> works, but the commented out code doesn't. What am I doing wrong? Thanks.
Don't forget to pu
Mayank Ahuja wrote:
Hi
Could you please let me know how to change the working directory
without going under through setting the path variable process.
Not sure what "going under through setting the path variable process"
means and/or what it has to do with chdir???
--
To unsubscribe, e-
[EMAIL PROTECTED] wrote:
I'm new to Perl and am trying to set a variable length byte array that is
passed to a socket as a string for output. I have the following which works,
but the commented out code doesn't. What am I doing wrong? Thanks.
use IO::Socket;
use Time::HiRes qw(usleep ualarm get
If you are running your script as a given user the script should
'inherit' the environment of the user that is is being run as. IF You
run as a daemon it should 'inherit' the environment of the user that
started the script. If your script issues a chroot command all bets are
off since.
To set th
> -Original Message-
> From: Aditi Gupta [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 10, 2006 4:16 AM
> To: Perl Beginners
> Subject: GD Graph
>
> Hello Everybody,
Howdy,
>
> Is there a way to plot each point separately on a 2D plot using
GD::Graph
> instead of passing the two
I'm new to Perl and am trying to set a variable length byte array that is
passed to a socket as a string for output. I have the following which works,
but the commented out code doesn't. What am I doing wrong? Thanks.
use IO::Socket;
use Time::HiRes qw(usleep ualarm gettimeofday tv_interval);
my
Hi Could you please let me know how to change the working directory without going under through setting the path variable process.I am using the following code.use warnings;use strict;use Cwd;chdir ('/user/bin') or die can not change the directory.if there is only one way then let me know how do we
Item: Obtaining complete Unix command line that evoked script as a string
If there is a more appropriate list for this, let me know; the other
perl lists I've seen seem to specialised for this.
I'm trying to get the complete command line that invoked a script as
a string, that is the output o
Hello Everybody,
Is there a way to plot each point separately on a 2D plot using GD::Graph
instead of passing the two dimensional array? I want to color differently
certain data points in the plot but I couln't find a way to do that.
Thanks in advance,
Best Wishes
Aditi
On 1/9/06, Tom Allison <[EMAIL PROTECTED]> wrote:
> Tom Allison wrote:
> $string =~ /(?:(A|B))/ WORKS
> $string =~ m|(?:(A|B))| DOES NOT WORK
> $string =~ m%(?:http://)%; ALSO WORKS
The m// operator is a quoting construct. The general rule is that,
after the initial m, you may use any
On 1/9/06, Tom Allison <[EMAIL PROTECTED]> wrote:
> I'm trying to capture the base URL and "everything after that"
You probably want to use the URI module, or another module.
http://search.cpan.org/~gaas/URI-1.35/URI.pm
Hope this helps!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscr
51 matches
Mail list logo