Hello Everybody,
Well, I am developing an appl. in CGi-PERL that wil run on webserver .
The app will call files on webserver and make changes in it.
The approach i am following is :
1). For the web interface i will develop perlscripts with html code(forms) in it.
This i will do .
2)
you want that to be:
$strip =~ /\w+/; #??
see the ~ thingie
-Original Message-
I'm running perl version 5.005_03 and I have a simple
match and capture that I can't seem to get to work.
while () {
$strip = /\w+/;
print "$strip \n";
}
This just returns to me
[EMAIL PROTECTED] (Bob Bondi) writes:
> I need to know if my browsers are sending IMS calls to the web
> server to fetch html, images, etc. Is Perl able to watch the data
> returned to the browser and tell me if IMS calls occurred?
Hi Bob,
You have to tell more about your environment.
If you u
On Fri, 13 Jul 2001, Assaf Spanier wrote:
> Hi I'm trying to replace the string 'aaa' to 'bbb' in my files
> the fallowing scrip DO NOT do the job, If anyone can tell me
> where is my mistake, I will be grateful.
>
> ---
> !/usr/bin/perl -w
>
>
> open OUT, "+
> while () {
I'm trying to get my apache web server up and running but everytime I try I
get a perl error about locale settings. I have tried a few things to get it
to work but none effective.
I'm using RH7.1, and have setup japanese language support (japanese kb,
sometimes I input japanese) with the folow
Hi I'm trying to replace the string 'aaa' to 'bbb' in my files
the fallowing scrip DO NOT do the job, If anyone can tell me
where is my mistake, I will be grateful.
---
!/usr/bin/perl -w
open OUT, "+) {
$_ =~ s/aaa/bbb/g;
}
close OUT;
On Jul 13, Bryan L Harris said:
>$cube_root = some_func("64");
The cube root is merely the one-third power:
$cube_root{64} = 64 ** (1/3);
And please, never quote numbers. It's a dubious practice.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I am Marillio
On Fri, 13 Jul 2001, Bryan L Harris wrote:
> How do I get a cube root in perl?
>
> $cube_root = some_func("64");
Raise your number to the 1/3 power. Be careful with negative numbers or
you will get a nan (not a number) error. The trick is to multiply your
root by -1, take the cube root, then m
How do I get a cube root in perl?
$cube_root = some_func("64");
Thanks in advance,
Bryan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Fri, 13 Jul 2001, Eric Chun wrote:
> What does
> $pid = open(CMD, "-|")
> mean? I assume this is forking a process, but I have not seen "-|" before.
> Has anybody come across this kind of perl command before?
| is the Unix (and DOS) pipe symbol, where you can take the output of one
com
--- Eric Chun <[EMAIL PROTECTED]> wrote:
> What does
> $pid = open(CMD, "-|")
> mean? I assume this is forking a process, but I have not seen "-|"
> before.
> Has anybody come across this kind of perl command before?
It's a MAGIC fork. =o)
Check out perldoc -f open.
=
print "Just ano
What does
$pid = open(CMD, "-|")
mean? I assume this is forking a process, but I have not seen "-|" before.
Has anybody come across this kind of perl command before?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Sorry maybe I should be a bit more explicit with my links :
http://bio.perl.org/Core/POD/bptutorial.html
Blast.pl and BPlite should help!
dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 18:55 13/07/2001 -0400, Pedro A Reche Gallardo wrote:
>HI All, I have a file from a blast report output which looks like the
>following:
Hi you might want to use the bioperl modules from CPAN to parse BLAST
results - it saves a lot of work. Check out http://bio.perl.org
HTH HAND
Dan
--
I am trying to send an email, ( which works), with an attachement (which was
a blank file, but is now nothing). I have previous versions of this code,
but this is the latest below. I was trying to use the Mail::Sender mod, but
it gave me the blank file. Does anyone have any assistance or lin
HI All, I have a file from a blast report output which looks like the
following:
gi|12383919|gb|BF981107.1|BF981107 602310351F1 NIH_MGC_88 H... 271
4e-72
gi|12168431|gb|BF825777.1|BF825777 MR2-HN0035-171100-001-a0... 242
3e-63
Alignments
>gi
_
Get your FREE download of MSN Explorer at http://explorer.msn.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 04:55 PM 7/13/01, you wrote:
> >I don't work with a lot of programmers. I hope to get into a
situation > >I do. Is it fair to say the majority are *holes?
>
>Bwahahah. Not at all. We're smarter than you, but not as presumptuous.
Of course, the nicer comment is:
"The ones who act like su
>I don't work with a lot of programmers. I hope to get into a situation where
>I do. Is it fair to say the majority are *holes?
Bwahahah. Not at all. We're smarter than you, but not as presumptuous.
--
Morbus Iff ( .sig on other machine. )
http://www.disobey.com/ && http://www.gamegrene.com/
Hello F.H,
Friday, July 13, 2001, F.H <[EMAIL PROTECTED]> wrote:
FH> Does anyone know how to get a difference between 2 dates. For instance
FH> something like (07/12/01 - 07/13/01) that would get me 1.
which date format has your input? in most common case i can recommend
convert dates to unixtim
Hello Michael,
Saturday, July 14, 2001, Michael Dube <[EMAIL PROTECTED]> wrote:
MD> I am using the Log::LogLite module to facilitate application logging in my
MD> script.
[...]
MD> I so far have been unsuccessful at doing this. Whenever I return $log, it
MD> is undefined in the calling module.
I am using the Log::LogLite module to facilitate application logging in my
script.
Log::LogLite works like this:
#create new Log::LogLite object
$log = new Log::LogLite($file, $ERROR_LOG_LEVEL);
$log->write("$string", $level);
I have written a module that has two subroutines, LogInit
There are a number of different modules (Date::Calc or Date::Manip
as two possiblities) which you might use, but really depends on the format
of the dates coming in. If you know they are pretty constant, then you
could use Time::Local:
use Time::Local;
my $Dates = '07/13/01 - 07/12/01';
Hi,
Does anyone know how to get a difference between 2 dates. For instance
something like (07/12/01 - 07/13/01) that would get me 1.
Thanks in advance
I.S
__
Get your own FREE, personal Netscape Webmail account today at
http://web
--- [EMAIL PROTECTED] wrote:
> Hi folks,
Hi. =o)
> I'm putting together simple script for doing dumps. I have the
> command running but I can't get the output to write to my log file.
> I keep getting errors and have tried several things and none of it
> works. Please help.
>
> Here is a sam
On Fri, 13 Jul 2001 [EMAIL PROTECTED] wrote:
> Hi folks,
>
> I'm putting together simple script for doing dumps. I have the command running but
>I can't get the output to write to my log file.
> I keep getting errors and have tried several things and none of it works. Please
>help.
>
> Here i
Hi folks,
I'm putting together simple script for doing dumps. I have the command running but I
can't get the output to write to my log file.
I keep getting errors and have tried several things and none of it works. Please help.
Here is a sample of what I'm doing :
while ( my $line = ){
(sys
Tim,
I wasn't connecting to a Cisco, but I used IO::Socket, I found the
Net:Telnet Package needed
more info about prompting,etc that I didn't have time look at. Ultimately,
I think between the
two, you could decide which one better suits your needs.
Craig
[EMAIL PROTECTED]
Pager
Numeric: 1-877-8
I would like to use Perl with WMI on W2K boxes. In particular, I would like
to collect performance counter information. Does anyone know any "good"
resources to start with? The Microsoft stuff is vague, at best.
Thanks in advance,
Jamie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
You can use tar + rsh or ssh to copy a directory tree over the network:
server $ cd /dir_to_backup
server $ tar cf - . | rsh backupserver 'cd /backupdir && tar xf -'
if you have GNU tar you should do this:
server $ tar czBf - . | rsh backup 'cd /backupdir && tar xzBf -'
If you don't have the a
Perl Guru's,
I need to make some 250 one line changes (add port security) on a
Cisco Router. I can build the commands with no problem, but I have
never connected to a Cicso with Perl before.
What module would I use? Net::Telnet?
TIA
--
[EMAIL PROTECTED]
Using The Bat! eMail v1
Hello Fellow Perl Users:
I'm trying to write a script that will go to a designated server and
directory, check the age of each directory and if it is older than 3 days
copy that directory and all of it's subdirectories to another server to be
archived.
I've succeeded in most of it, except copying
> In my case, all GET requests are full URI's, so that's not a problem. The
> problem is that the page you referred to makes no mention of the CONNECT
> header, which is supposed to preface the GET request. The CONNECT is
> supposed to have the URI of the proxy server to send the GET request
throu
U. Calm down geezer.
I was just suggesting an alternative. Not saying he should use only JS. Use
JS to do simple validation on the form so the client doesn't have to keep
querying the server to do simple validation. Once the JS feels the form is
OK to submit, validate properly in perl. Doing
That which I say three times it true:
Do not trust user input. Do NOT trust user input. DO NOT TRUST USER INPUT.
As mentioned, users can turn off javascript. You're assuming of course that
skr!pT k1DD13s use browsers. It is trivial to build an HTTP request and
telnet into the server at port 80.
>Are there modules that will allow me to read from and write to tape on a
record or block basis?
(a) Where have you looked? Have you tried http://www.cpan.org and
http://www.google.com ?
(b) You can always write a Perl module to wrap around a driver in C, which
I'm sure will exist.
{Pete
do::h!!
it looks like friday is getting the best of me, too!
while ()
{
if (/^#include\s+"([^"]+)"/) {push @headers, $1}
}
-Original Message-
From: Mooney Christophe-CMOONEY1
[mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 10:02 AM
To: [EMAIL PROTECTED]
Subject: RE: Regex
On Fri, 13 Jul 2001, Yvonne Murphy wrote:
> It's Friday evening and my brain is already beginning to close down for
> the weekend although I haven't yet given it
> permission to do so! I need to get this regex problem I have sorted
> soon, but my brain refuses to co-operate with me.
>
> I need to
try this:
open I, "inputfile";
my @files;
while() { if (/#include\s*(.+?)/sig) { push @files, $1 } }
if i understand your problem correctly, @files should hold all the
"foo/bar.h" stuff
hth
Jos Boumans
> I need to match the following type of #include statement found in a C
> header file:
> #i
This will take all of the include files it finds in FILE and store them in
the array @headers.
while ()
{
/^#include\s+"([^"]+)"/;
push @headers, $1;
}
Fridays can definitely be killers! ;)
-Original Message-
From: Yvonne Murphy [mailto:[EMAIL PROTECTED]]
Sent: Friday, J
Hi All,
It's Friday evening and my brain is already beginning to close down for
the weekend although I haven't yet given it
permission to do so! I need to get this regex problem I have sorted
soon, but my brain refuses to co-operate with me.
I need to match the following type of #include statemen
I have a job that will require processing very big files that reside on tape.
I really don't want to read them onto disk if possible.
Are there modules that will allow me to read from and write to tape on a record or
block basis?
--
-
Hello Jim,
I noticed a response telling you to use JavaScript to validate your
form input.
Personally I browse with my JavaScript turned off to avoid pop-up ads
so I don't believe it is a good idea to try to validate information
using it.
Here is an excerpt from my Sams book that could help you
> -Original Message-
> From: Mooney Christophe-CMOONEY1 [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 3:33 PM
> To: 'Rogirio Brito'; [EMAIL PROTECTED]
> Subject: RE: multiple entry/exit points
>
> Personally, i am very liberal with my lasts/breaks/returns/gotos.
>
> T
nope, you dont need to escape that... reason for that is logical, but maybe
not consistent...
see, . is already a character class of it's own, holding 'everything'. So if
you put that in ANOTHER character class, that would kind of beat the purpose
of making a new class in the first place... so Per
hmm
how about
while(){
if(m/[^'].*?(\&[^&]\S+)[^"']/){
print "line $i: " . $1 . " is a subroutine\n";
}
if(m/-\>(\S+)/){
print "line $i: " . $1 . " is a subroutine\n";
}
$i++;
}
it's not perfect, but it'll do the job...
-Ak
>-Original Message-
>From: Paul [mailto:[EMAIL PROTECTED]]
>Sent: 12 July 2001 19:44
>To: Ken; Sebadamus; [EMAIL PROTECTED]
>Subject: Re: MID in Visual Basic...
[...]
>Personally, I'd probably say
>
> my($val) = $line =~ /=\s*([\d.]+])$/;
>
>That should put the 33.10 in $val.
>If that'
> I need to know if my browsers are sending IMS calls to the web server to
> fetch html, images, etc. Is Perl able to watch the data returned to the
> browser and tell me if IMS calls occurred?
Hi there,
If the browsers are local and the server are remote, you could setup a proxy
server (I'm sur
> open CSV,"
Hi!
I am in need of a perl program that looks for sub-routine calls from a single
sub-routine (lets say sub-routine 'one') and shows which sub-routines are
called from that sub-routine (sub-routine 'one').
Hence stating all the dependencies of sub-routine 'one'
Rizwan
On Fri, 13 Jul 2001, John Edwards wrote:
> I would do this using Javascript in the form.
>
> The advantage of this is the form data is validated without the client
> having to return the form to the server, which then would have to validate
> and return the the client the errors. With JS you can
Schwartz, Collier,
First let me thank you for helping me in this regard. Also, I am sorry for
sending you the mail in unformatted manner. Actually, I had formatted the mail
by using xemacs and had send it. But, I don't know how the message looked like
this. Coming to the point,
Schwartz, I h
I would do this using Javascript in the form.
The advantage of this is the form data is validated without the client
having to return the form to the server, which then would have to validate
and return the the client the errors. With JS you can do it all client-side
and only allow the form to be
On Jul 13, Tom Dubs said:
>while () {
>
>$strip = /\w+/;
>print "$strip \n";
>}
A regular expression in scalar context returns true or false. If you want
to get at a specific part of the match, you need to:
1. use capturing parentheses, and
2a. use list context, OR
2b. us
I've created a CGI program that asks a user to fill in a number of fields.
I would like to validate that the required data is present and in correct
format.
A date, time, phone number, Ip Address etc.
Obviously I could code a number of regex's, but I was wondering if there was
a module or script
t
I'm running perl version 5.005_03 and I have a simple
match and capture that I can't seem to get to work.
while () {
$strip = /\w+/;
print "$strip \n";
}
This just returns to me a 1. Which makes sense to an
extent, for if the match is found then it will return
a 1 for "true". Bu
At 21:55 13.07.2001 +1000, Mal Beaton wrote:
>I am stuck on the foreach loop getting the first character of $user
>
>foreach $user (keys %{users{abc}}){
>### trying to get the first character of $user here
my $fc = substr($user, 0, 1); # $fc now contains the first character of $user
Aaron Crai
For long reasons that I'll reiterate at request, I can NOT use LWP::*,
specifically, I don't have the ability to use LWP::UserAgent to set or
understand proxies.
I've written my own lowlevel http calls and they've been working fine, but
it's now time to implement proxy support. I've checked vario
On Jul 13, Mal Beaton said:
>%users
>
>$users{abc}{$user}
>
>foreach $user (keys %{users{abc}}){
You're missing the $ here.
foreach my $user (keys %{ $users{abc} }) {
my $fc = substr($user, 0, 1);
# ...
}
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~jap
I am working on a proxy log analysis script
I have hash
%users
$users{abc}{$user}
there are approx 10, 000 users in $user
I intend to have a directory structure
year/month/day/a - z
if a user is andrew.john his report file will be written to the dir
year/month/day/a/andrew.john.date
similari
Hello Rich,
Friday, July 13, 2001, Busse, Rich <[EMAIL PROTECTED]> wrote:
BR> In C, I can do something like this:
BR> char ch ;
BR> char sz [] = "?:\\dir\\myfile.ini" ;
BR> for ( ch = 'c' ; ch <= 'z' ; ch++ )
BR> {
BR> sz[0] = ch ;
BR>
At 07:09 13.07.2001 -0400, Busse, Rich wrote:
>In C, I can do something like this:
>
> char ch ;
> char sz [] = "?:\\dir\\myfile.ini" ;
> for ( ch = 'c' ; ch <= 'z' ; ch++ )
> {
> sz[0] = ch ;
> . . .
>
>to spin thru all the possible
Hows about
my $sz='?:\\dir\\myfile.ini';
foreach my $ch (c..z) {
substr($sz,0,1)=$ch;
...
}
my $sz='A string';
foreach my $ch (split(//,$sz)) {
print "$ch\n";
}
Gary
On Friday 13 July 2001 12:09 pm, Busse, Rich wrote:
> In C, I can do something like this:
>
> char ch ;
> char
Greetings: All,
I would like to know how can I determine if my file name is in another
file? Here's my example:
Using files in my mail queue, I am able to read in and check for a
pattern. I have the original files file name, let's call it QUEUE.XZZ.
Now, I want to check if 'QUEUE.XYZ' is lis
Hello Govinderjit,
Friday, July 13, 2001, Govinderjit Dhinsa <[EMAIL PROTECTED]> wrote:
GD> How do I please get the fields to start from the positions I want
GD> them to please;
GD> For example I want;
GD> $fields[0], (which is 7 characters long to start from position
G
> How do I please get the fields to align left please;
At the moment the output of the fields align right;
113418VGary O'Callag 407358 OVTQ
WV113394 C
In C, I can do something like this:
char ch ;
char sz [] = "?:\\dir\\myfile.ini" ;
for ( ch = 'c' ; ch <= 'z' ; ch++ )
{
sz[0] = ch ;
. . .
to spin thru all the possible drives on a Windows NT box. But Perl complains
about trying t
How do I please get the fields to start from the positions I want
them to please;
For example I want;
$fields[0], (which is 7 characters long to start from position
"0").
$fields[1], (which is 10 characters long to start from position
"10").
$fields[2],
Hi, I have the following code:
open (READ,"C:\\timewritten.txt")or die "Can't open READ: $!\n";
$timewritten = ;
close (READ) or die "Can't close READ: $!\n";
$x = 0;
use Win32::EventLog;
$handle=Win32::EventLog->new("Application")
or die "Can't op
I'm trying to get my apache web server up and running but everytime I try I
get a perl error about locale settings. I have tried a few things to get it
to work but none worked.
I'm using RH7.1, and have setup japanese language support (japanese kb,
sometimes I input japanese) with:
Apache/1.3
70 matches
Mail list logo