I need to make CGI script for changing user password throught web
browser. I have one, but doesn't work:
I'm using FreeBSD 4.6 Apache 1.3.24
#!/usr/bin/perl -w
use Expect;
$suexec = /usr/bin/su;
print Content-Type: text/html\n\n;
sub ChangeUnixPassword {
my ($account,$passwd) =
Hi Pavel,
I know that perl mostly doesn't like the sticky-bits on files such as :
-r-sr-xr-x 1 root bin 24576 Aug 6 1998 /usr/bin/su
He just doesn't executes them.
Personaly I haven't found a solution for this. I know a collegue of mine has written
a C-programm around it.
Kyle, et al --
...and then Kyle Babich said...
%
% This is what I have:
%
% my %pages = (Yahoo,http://www.yahoo.com/;,
% Google, http://www.google.com/;,
% All The Web, http://www.alltheweb.com/;);
%
% while ( my ($key, $pages) = each %pages ) {
%print qq{a href=$pages$key/a};
Hi everybody
I've got text file on the local machine and Apache too.
What I don't know is how can I display this file like html file using cgi.
The file looks like:
USER PID PPID %CPUTIME COMMAND
user 26794 26002 0.00:00
user 4687 4685 0.00:00 -ksh
Hi,
I'm using a session for my login system. So the session will keep the
user's username and password. My question is if we able to retrieve the
session back (for another page), is it necessary to check the username and password
against
the database ?
I do not want to have unnecessary
Hi,
Multiple ways of doing this :
#!/usr/bin/perl
use strict;
my $logfile = ...;
open(FH, $file);
my @contents = FH;
close (FH);
print pre @contents /pre;
# -
or
print tabletrthUSER/ththPID/ththPPID .. /th/tr;
foreach $line(@contents) {
##
$line =~
I usually use random numbers, and keys for things like this, for
example:
I have a users table in a database set up like this:
id integer auto increment primary key
usernamevarchar(32)
passwordvarchar(32)
rand_keyfloat
this way I can set the users cookie
Kyle --
...and then Kyle Babich said...
%
% That confuses me; I would just copy and paste and that would be it but
% I would have no idea how that is working and I don't really want to put
I think that's a wise course :-)
% anything in that I don't understand yet. Is there a simpler way
No, this is quite a simple problem actually. Here's how.
my $alias = home|htmlBody,Header,homebody,footer;
my ($name, $subs) = split(/\|/, $alias);
my @subs = split(/\,/, $subs);
foreach $sub(@subs){
my $return_val = {$sub}($pass_in_vars);
}
So the first part I assume you've got where
Hi all,
Can you recommend me a good editor for Perl scripts that runs under Windows?
It should:
1. Save the text with Unix end of lines.
2. Write somewhere the current line I am in.
3. Not necessary but it would be wonderful to have a hotkey to jump from
subroutine to subroutine, or to list the
That confuses me; I would just copy and paste and that would be it but
I would have no idea how that is working and I don't really want to put
anything in that I don't understand yet. Is there a simpler way that
would be more like:
my $links = #hash here ;
Kyle, et al --
...and then
I think that you want too much for Perl editing under Window$, but try
Ultra Edit or JEdit. I recommend JEdit, it's probably best editor
written in Java and it's designed for developers.
Pavel
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24,
hiho Octavian and allperl comunity,
the simple solution to this problem is called
PROTON 3.1 and can be downloaded @ http://www.meybohm.de/
(http://www.meybohm.de/proton.html)
you can do, what I did, and that is mounting your user homedir (with
samba)as some drive X: or whatever, and code away!
From: Octavian Rasnita [EMAIL PROTECTED]
Subject: What editor for Perl do you recommend?
Date: Mon, 24 Jun 2002 08:06:40 +0300
Hi all,
Can you recommend me a good editor for Perl scripts that runs under Windows?
It should:
1. Save the text with Unix end of lines.
2. Write somewhere the
Teddy --
...and then Octavian Rasnita said...
%
% Hi all,
Hello!
%
% Can you recommend me a good editor for Perl scripts that runs under Windows?
% It should:
vim. Maybe gvim if you're feeling decadent.
%
% 1. Save the text with Unix end of lines.
Yep.
% 2. Write somewhere the
Is there an easy way to display the HTML from another website on your page without a
redirect?
for example, the below CGI just forwards you:
#!/usr/local/bin/perl
print Location:http://thecgibin.com/quickcode/redirect.shtml\n\n;;
I would mlike a CGI to just get the HTML from another page
You need to check out the LWP module.
http://search.cpan.org/doc/RSE/lcwa-1.0.0/lib/lwp/lib/LWP.pm
Scot R.
inSite Internet Solutions
[EMAIL PROTECTED]
http://www.insiteful.tv
-Original Message-
From: Fred Sahakian [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 9:49 AM
To:
Assuming you are on UNIX, run your script suid. For example, if your script
was called auth.cgi, here is what you would do:
1st, at the command line:
chmod 4711 auth.cgi
2nd, change your shebang line in your script to include the -U (run as user)
flag:
#!/usr/bin/perl -U
Now
You are trying to assign a static value to something that comes from the
form. If you create a field called comments (or anything you want to call
it, that's just what I chose) on your form and then type your test string,
it will work with the following change to your code:
Octavian,
Secondly, by your explanation, I'm not sure whether you know this, but your if
should be like
this:
--
my $test = sub_name();
if ($test){
# stuff
}
--
Or
--
if (sub_name()){
# stuff
}
Martin,
Well, you can use a simple html tag called pre.
---
open(FILE, /path/file);
local $/ = undef; # slurp mode, pull all data coming in one shot (so it all goes into
a scalar)
$contents_of_file = FILE;
close(FILE);
print qq^
pre
$contents_of_file
On Mon, Jun 24, 2002 at 10:03:09AM -0600, [EMAIL PROTECTED] wrote:
Niko,
If you don't want to compromise security then use .htaccess instead. Then base
your session
file off of the $ENV{'REMOTE_USER'}. Now of coarse this is assuming you are using
Apache. Then yes
you do need to check
definitely go with emacs and use perl-mode then font-lock-mode if you
want syntax highlighting.
At 03:51 PM 6/24/02 +, Francesco Scaglioni wrote:
From: Octavian Rasnita [EMAIL PROTECTED]
Subject: What editor for Perl do you recommend?
Date: Mon, 24 Jun 2002 08:06:40 +0300
Hi all,
emacs is a good one. I also like TextPad (www.textpad.com).
Scot R.
inSite Internet Solutions
[EMAIL PROTECTED]
http://www.insiteful.tv
-Original Message-
From: Jonathan Gines [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:19 AM
To: Francesco Scaglioni; [EMAIL PROTECTED]
Hii,
I want to create a link to another page and want to pass some variables
in which i do not want the user to know. (POST method)
how to do that ?
regards,
niko
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Recognizing that this is a religious issue among many
programmers, I submit for what it is worth that I use
Ultra-Edit (Windows). It has everything you ask, you
can extend the syntax for color-coding, run command
line programs and capture the output in a window, edit
remote files via FTP, record
Only way I know of is to have the variables in their
own private form somewhere on the page, such as: (HTML
tags embedded in email message here!)
form name=otherForm
action=myScript.pl
method=POST
input name=var1 type=hidden value=val1
input name=var2 type=hidden
Greetings All,
I have the following code, from which I attempt to call the module
Test
#!/usr/local/bin/perl
###
### Program name: demo.pl
### Created By:Theresa Mullin
require cgi.lib;
### Include the CGI stuff
use CGI qw(:standard);
### Include the database access stuff
use DBI;
I just spent about 5-6 hours going through some of the unix mans for perl. I'm trying
to get a better grasp on perl/cgi because right now a lot of it still confuses me even
after reading a whole book about it. I think I'm mostly confused because there are so
many ways to do things and then
Comfortably numb? ;-)
This might help (a little more introductory...):
Copyright: 2001
Format: Paper Bound w/CD-ROM, 1057 pp.
ISBN: 0-13-028418-1
In Perl How to Program, the Deitels and their colleagues, Tem R. Nieto
and David C. McPhie, discuss topics you need to build complete,
Web-based
On Monday, June 24, 2002, at 01:09 , drieux wrote:
[..]
use Test;
[..]
there is also a 'name space' clash here
Test.pm already exists as a real module
in most of the perl releases.
cf: perldoc -m Test
So you may want to get into h2xs a little sooner -
so that you can feel safe about doing
Ben,
I have found any of the O'Reilly books
(http://perl.oreilly.com/) to be an excellent
resource. I own _Programming Perl_ (a.k.a. The Camel
Book) and find it's writing style to be very easy to
read (even if I still have to re-read the complicated
bits several times to really understand them),
-Original Message-
From: Theresa Mullin [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:30 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Running Modules
Greetings All,
I have the following code, from which I attempt to call the module
Test
---BeginMessage---
what about a sesion id based on their IP? or soem relevent info like that?
may be a stupid way to do it.. but i track the count of how many users are
currently at my site by their IP/timestamp that is saved for 5 min. if
someone accesses the web site 5+ min after a
Greetings,
I would like to sort a hash by value. The hash values are numbers. I would
like to sort this by desceding order. How would I do this? I have searched
and found nothing on it. I have found lots on sorting by key though...
Please help dudes!
Ciao
LK
--
To unsubscribe, e-mail:
$_=~s/\n//msg;
What does the above match?
LK
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello Pat,
You can do it like so:
my %hash;
foreach(sort {$hash{$a} = $hash{$b} } keys %hash) {
}
Shawn
- Original Message -
From: Postman Pat [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 1:46 AM
Subject: sorting a hash by value.
Greetings,
Shouldn't that be values %hash for sorting the values (see below),
also be aware that a hash has no order like an array so you just have to
do what you want while in the foreach loop (or stick them into an
array).
my %hash;
foreach(sort {$hash{$a} = $hash{$b} } values %hash) {
foreach(sort { $hash{$a} = $hash{$b} } values %hash) {
print $_\n;
}
Err... This will not work... You will be trying to get a hash value based on the
value...
It's early
my %hash=(thumb='122',tom='21',muffit='48',miss='31');
foreach(sort { $hash{$a} = $hash{$b} } values %hash) {
print
Hi,
Let's say I'm opening a file.
How do I read the last line of the file?
is there any function in doing so?
Thanks.
open (FILE, yourfile.txt);
my @FD = FILE;
close (FILE);
my $lastline = $FD[$#FD]
Hope this help,
Smiley Connie =)
- Original Message -
From: Karen Liew Ying Ping [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 6:05 PM
Subject: Reading File
Hi,
Let's say I'm
Postman Pat wrote:
$_=~s/\n//msg;
What does the above match?
That matches the newline character (\n) globally (/g) and replaces it
with nothing. The /m option is not needed because the ^ and $ anchors
are not used and the /s option is not needed because there is no . in
the regular
Peter --
...and then Peter Scott said...
%
% At 06:01 AM 6/23/02 -0500, David T-G wrote:
% % Would you like tracing that goes off when you go into a function?
% Suppose
% % if you gave a numeric argument to 't' it would trace up to that depth
% % in subroutine calls beneath the current level
Hi,
I added one. The seek didn't work.
I don't have the ReadBackwards, but at least some timeing results :
Benchmark: timing 1 iterations of complete, frk, pop...
complete: 21 wallclock secs (16.93 usr + 0.80 sys = 17.73 CPU) @ 564.02/s (n=1)
frk: 83 wallclock secs ( 1.34
-Original Message-
From: David vd Geer Inhuur tbv IPlib
[mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 6:03 AM
To: [EMAIL PROTECTED]
Subject: if-statement and grep in one go
Hi,
I need some help on the following.
In my script I show users some infodocs after they
could puting the entire file into an aray then i think there is a function to
get the number of elements... then just use that to know what the last
element would be?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Sunday, June 23, 2002, at 10:11 , Timothy Johnson wrote:
[..]
If you put the module above in a file called UC.pm in the site/lib/Tim
folder, you will have a module with your reusable subroutine. The only
weird part: Don't forget that the last line should be just a '1'. Just
put
a use
could puting the entire file into an aray then i think there is a function to
get the number of elements... then just use that to know what the last
element would be?
my @array = FH;
print $array[-1];
Tor
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
I can't test this here, but would this work?
while(FILE){
$scalar = $_;
}
print $scalar;
$scalar should have the last line in it unless the EOF gets passed or
something. That way you still end up reading through the entire file, but
you don't have to slurp up the entire file to memory.
Hello,
I require a simple search (hit list) for my website. Its done in ASP. Are there any
scripts that I could download and easily add it to my site?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi expert,
I am install a Bioinformatics application, which is useperl module. In Makefile.PL,
there is 'use 5.6.1;', but I have only perl5 (5.0 patchlevel 5 subversion 3), and I
have no 5.6.1 module. I search CPAN, I can not find this module, do I need install
perl5.6.1, do I have other
Hi expert,
I am install a Bioinformatics application, which is useperl module. In Makefile.PL,
there is 'use 5.6.1;', but I have only perl5 (5.0 patchlevel 5 subversion 3), and I
have no 5.6.1 module. I search CPAN, I can not find this module, do I need install
perl5.6.1, do I have other
On Monday, June 24, 2002, at 07:08 , Shishir K. Singh wrote:
[..]
You are out of luck. You have to install the latest 5.6.1 perl. You can
overwrite your current one or install it in some other place. Better to
have all your working script confirm to one version cause it gets messy
after
On Jun 24, Postman Pat said:
I would like to sort a hash by value. The hash values are numbers. I would
like to sort this by desceding order. How would I do this? I have searched
and found nothing on it. I have found lots on sorting by key though...
Where did you search? A single check to
Greetings all,
I'm going to be starting a project shortly where I will require
the ability to communicate with the program via TCP/IP... Does anyone
have any experience with this? Any suggestions on where I should start
looking for information? It needs to be fairly secure with some
hello , I have a quiz script. I randomly generates questions up to an
certain number ( what is ever set in the quiz name settings table) , passes
it ina variable to a grade.cgi. the variable looks like this
!34!56!5!67! all question numbers seperated by a delimiter. all these
questions
Is there? So that I don't have to constantly type it.
Thanks.
__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Maybe you are writing too many perl programs.
Else use the m4 macro processor and then run it through every time.
-Original Message-
From: LRZ [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 12:18 PM
To: [EMAIL PROTECTED]
Subject: #!/usr/bin/perl - is there a macro for this?
Is
On Jun 24, LRZ said:
Is there? So that I don't have to constantly type it.
What would you do with the time you saved?!
--
Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for Regular
On Monday, June 24, 2002, at 09:20 , Jeff 'japhy' Pinyan wrote:
On Jun 24, LRZ said:
Is there? So that I don't have to constantly type it.
What would you do with the time you saved?!
the other idea is to have 'template files'.
cf:
LRZ --
...and then LRZ said...
%
% Is there? So that I don't have to constantly type it.
What editor are you using? If you're using vim, the Real Man's* Editor,
you could define a command that checks each *.pl file you open for the
shebang line and puts it there if it's missing. I have an
Hi everybody,
I've done a dummy test, and finalized that David's method is the
Goal Method, that's really Really Very Great !!!
I've made a 50MB Text file ( Fixed length, 1001 char per line, with \n)
for this test, and have the following results :
SCRIPT 1 # Suggested by Johnson
On Monday, June 24, 2002, at 09:15 , LoBue, Mark wrote:
[..]
Upgrading perl isn't always an option, I would love to use 5.6.1.
Yes, Intellectually I understand this,
so please forgive the 'flippancy' in my
general response - I somewhat take the approach
that since it is available for 'macs' -
Hi,
I have a long sequence of letters ( an amino acid sequence). I want to
extract 4letters either side
of each S and get them into an array.
e.g.,
ADFGTREDSWQACVDFRSSSGHYT
would get
TREDSWQAC
VDFRSSSGH
DFRSSSGHY etc.
I have worked out how to do this by using substr() but wondered if
On Jun 24, Richard Adams said:
@peptides = $sequence =~ /(\w{4}S\w{4})/g;
this works up to a point, but if there are 2 adjacent 'S' the 2nd one
is not extracted, I guess because the regexp engine continues after the
end of the previous match ie., it doesn't extract DFRSSSGHY above.
Here's the
-Original Message-
From: drieux [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 9:55 AM
To: begin begin
Subject: Re: use 5.6.1
On Monday, June 24, 2002, at 09:15 , LoBue, Mark wrote:
[..]
Upgrading perl isn't always an option, I would love to use 5.6.1.
Yes,
I'm not sure as to proper naming scheme, so bear with me...
When I parse my input line, the url thingy,
http://www...stuffcgi?newuser, the if statement works and jumps to the
correct subroutine which displays an html page with a form. When this form
is submitted it goes to
It sounds then, like what you essentially want to match is:
four word characters
followed by
one or more S
followed by
four word characters
which could be represented like so:
@peptides = $sequence =~ /(\w{4}S+\w{4})/g;
The one fallacy of this algorithm is that if you have a
Hi everybody,
I've done a dummy test, and finalized that David's method is the
Goal Method, that's really Really Very Great !!!
I've made a 50MB Text file ( Fixed length, 1001 char per line, with \n)
for this test, and have the following results :
SCRIPT 1 # Suggested by Johnson
Hello all,
I'm having a problem with (I suppose) pattern matching.
Here's the task: To take binary data from windows(little-endian)
and convert to Unix(big-endian). If the file is all numeric, I don't
have a problem, but it isn't. I need to be able to recognize that
one of the four bytes is
At 10:37 PM 6/23/02 -0400, Shawn Bower wrote:
I'm trying to use the HTML::Template package, I got it all set up with a
template web page and I have set up the parameters in my perl script and
it runs fine when I run it from the command line but when I load it
using my browser the variable don't
On Mon, Jun 24, 2002 at 09:18:01AM -0700, LRZ wrote:
Is there? So that I don't have to constantly type it.
# ln -s /usr/bin/perl /p
Thanks.
You're welcome :-)
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
-Original Message-
From: Harry Putnam [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 23, 2002 3:13 AM
To: [EMAIL PROTECTED]
Subject: Debugging the debugger
Just going thru the debug tutorial:
perldoc perldebtut
Following along having writen the example script to disk.
I
-Original Message-
From: Andrew Stone [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 1:29 PM
To: [EMAIL PROTECTED]
Subject: Binary File Pattern Matching
Hello all,
I'm having a problem with (I suppose) pattern matching.
Here's the task: To take binary data from
From: Richard Adams [EMAIL PROTECTED]
I have a long sequence of letters ( an amino acid sequence). I want to
extract 4letters either side of each S and get them into an array.
e.g.,
...
I would like to ask all the people who invest their time and answer
the questions in
(This is still the beginner's list, right?)
I'm surprised at how often the answer to a question is You should be using
a hash, not an array. So my question is, how many keys is too many? Is
there a rule of thumb? (like if you have over 500,000 items, use a 2-d
array instead of a hash)
TIA.
From: Bradley J. Seward [EMAIL PROTECTED]
I'm not sure as to proper naming scheme, so bear with me...
When I parse my input line, the url thingy,
http://www...stuffcgi?newuser, the if statement works and jumps to
the correct subroutine which displays an html page with
From: Bryan R Harris [EMAIL PROTECTED]
(This is still the beginner's list, right?)
I'm surprised at how often the answer to a question is You should be
using a hash, not an array. So my question is, how many keys is too
many? Is there a rule of thumb? (like if you have over 500,000
-Original Message-
From: Bryan R Harris [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: when to use hashes...
(This is still the beginner's list, right?)
Sure, why not?
I'm surprised at how often the answer to a question is
but the two keyword variables are completely unrelated.
Not sure what you mean? I know they are separate, which means the elsif is
unaffected by the other... if I understand. I'll send you the file attached
if you want.
But here's the parse_input subroutine:
sub parse_input
{
if
Sorry about that...forgot to reply to all. Working with 4 languages at
once tends to turn my brain to mush.
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:41 PM
To: 'Andrew Stone'
Subject: RE: Binary File Pattern Matching
Send this to
On Monday, June 24, 2002, at 02:23 , Jenda Krynicky wrote:
I would like to ask all the people who invest their time and answer
the questions in this list to ignore the posts whose authors were too
lazy to specify a meaningful subject.
If they do not get any reply, they might start
From: Bradley J. Seward [EMAIL PROTECTED]
but the two keyword variables are completely unrelated.
Not sure what you mean? I know they are separate, which means the
elsif is unaffected by the other... if I understand.
I mean ... you are passing the parse_input() a variable, and later on
On Monday, June 24, 2002, at 11:21 , Bryan R Harris wrote:
[..]
I'm surprised at how often the answer to a question is You should be
using
a hash, not an array.
because of the 'tree search' structure that simplifies the
query for the value - rather than the linear 'walk array
and test all
Use a hash when you want to access data by a key.
(like if you have over 500,000 items, use a 2-d
array instead of a hash)
Perl doesn't have 2-d arrays.
Sure it does, it just takes a little more work to implement them. =)
If you have 500,000 of something, that gets in to
the realm of
From: Bryan R Harris [EMAIL PROTECTED]
So about how many keys do you have to have before you start
questioning whether you should be using a hash? Is 15,000 keys too
many?
I've got lots of data files with 15000+ x,y,z values. The x,y values
are the same, but the z's are different between
-Original Message-
From: Bryan R Harris [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:58 PM
To: [EMAIL PROTECTED]
Subject: RE: when to use hashes...
Use a hash when you want to access data by a key.
(like if you have over 500,000 items, use a 2-d
array
On Monday, June 24, 2002, at 11:30 , Theresa Mullin wrote:
[..]
use Test;
[..]
Here is module Test:
#!/usr/bin/perl
### Program Name: Test.pm
### Created By:Theresa Mullin
### Date: 5/20/02
package Test;
$dbase = TEST;
print And to all a good night \n;
The code
On Monday, June 24, 2002, at 12:47 , Ben Huyghebaert wrote:
I just spent about 5-6 hours going through some of the unix mans for perl.
phase one error:
documentation is written in a non-formalized language
code is written in almost like a formalized language
the
On Monday, June 24, 2002, at 01:00 PM, drieux wrote:
On Monday, June 24, 2002, at 11:30 , Theresa Mullin wrote:
[..]
use Test;
[..]
Here is module Test:
#!/usr/bin/perl
### Program Name: Test.pm
### Created By:Theresa Mullin
### Date: 5/20/02
package Test;
Hi all,
I would like to match a string variable in a longer string retreiveing
the match plus 5 extra characters at each side of the
match.
This what I mean:
$var = 'something';
$line = 'SDFGHAsomethingWDFTsft';
and, I would like to get in a new variable the string
'DFGHAsomethingWDFTs'.
Any
Hi all,
I would like to match a string variable in a longer string retreiveing
the match plus 5 extra characters at each side of the
match.
This what I mean:
$var = 'something';
$line = 'SDFGHAsomethingWDFTsft';
and, I would like to get in a new variable the string
'DFGHAsomethingWDFTs'.
Any
@matches = $var =~ m/\w{5}$something\w{5}/g
should work I believe
-
Craig Moynes
[EMAIL PROTECTED]
Pedro --
...and then Pedro A Reche said...
%
% Hi all,
% I would like to match a string variable in a longer string retreiveing
% the match plus 5 extra characters at each side of the
% match.
This is pretty popular today.
See the no-subject thread from Richard Adams earlier today,
How exactly does on pre-compile the regex? I would be interested in seeing
this.
[Jess]
-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 5:07 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: matching extracharacters
Hi all,
I
On Mon, Jun 24, 2002 at 04:55:07PM -0400, Pedro A Reche wrote:
Hi all,
I would like to match a string variable in a longer string retreiveing
the match plus 5 extra characters at each side of the
match.
This what I mean:
$var = 'something';
$line = 'SDFGHAsomethingWDFTsft';
and, I
How exactly does on pre-compile the regex? I would be interested in seeing
this.
[Jess]
Three cases:
a) Hardcode - /(\w{5})(something)(\w{5})/
b) Intepolate variable in the search variable, value remaining constant throughout the
program
$var = something
/(\w{5})(something)(\w{5})/o
On Monday, June 24, 2002, at 01:48 PM, drieux wrote:
On Monday, June 24, 2002, at 01:34 , bob ackerman wrote:
[..]
yes but there is not a place to easily grasp the idea of using h2xs.
a little holdhanding would help.
[..]
thanks for keeping me honest homeboy
we'll be back with
From: Shishir K. Singh [EMAIL PROTECTED]
How exactly does on pre-compile the regex? I would be interested in
seeing this.
[Jess]
Three cases:
a) Hardcode - /(\w{5})(something)(\w{5})/
b) Intepolate variable in the search variable, value remaining
constant throughout the program
All,
I have written a small cgi script that allows my users to submit some text
to a db.
everything work well except that it seems to be doubling their return keys.
Each time
they modify their entry the lines get one return key further apart. I read
this in one
of the Oreilly books...
Upon
1 - 100 of 106 matches
Mail list logo