On Sun, Oct 31, 2004 at 01:48:10PM +0100, Eelco Alosery wrote:
> Hello,
>
> I want to filter a url from $ENV{'HTTP_REFERER'}
> If the url is http://www.testdomein.nl/test.html
> I only want a result testdomein.nl
>
> I have been testing whit this script
> $url =~ s/.*?\.(.+?)\/.*?/$1/is;
>
> It
On Tue, Apr 13, 2004 at 10:54:55PM +0200, Louis Pouzin wrote:
> I'm puzzled. Why is gore interfering at all, and what's wrong with the
> squeaking statements ?
What's wrong with the statements is exactly what the warnings are telling
you!
Value of construct can be "0"; test with defined() at ql
On Tue, Sep 17, 2002 at 12:00:45PM +0200, allan juul wrote:
> hi
>
> we need to replace tags like:
>
>
>
> to:
>
>
>
>
> it seems so simple but i am on the verge of giving up understanding the
> negative lookahead logic.
>
> this is how far i have come (obviously not working)
>
> my $s
On Wed, Jul 31, 2002 at 07:21:04PM +0200, Eelco Alosery wrote:
> I read whit LWP::Simple a url, and from that string i need the keywords.
>
> I use this script:
>
>
> if ( $srting =~ s//$1/ig )
If you use .* inside the quotes then you may end up matching too much.
Try this instead:
s/]*>/$1/i
On Tue, Jul 02, 2002 at 03:59:08PM +0900, Joel Rees wrote:
> Get this warning, and I know why, but it mentions an "our declaration":
>
> ---
> Name "URI::URL::ABS_REMOTE_LEADING_DOTS" used only once: possible typo
> at
> autohits.pl line 282
On Tue, Dec 18, 2001 at 02:53:24PM +, Adam Witney wrote:
>
> Basically I want to strip out the contents of the first [], but this seems
> to be matching from the outside in. Is there a way to make it look for the
> first ] after the [ ?
Use a negated character class.
m/\[(EC:[^\]]+)\]/
Ron
On Mon, Oct 29, 2001 at 07:37:43PM +0100, allan wrote:
> thanks ronald
> for the suggestion which looks better but is just as ineffecient as mine
> original. i timed both versions twice traversing 878 files in 1006
> directories of total size 839.441066 MB. both taking 280 secs each time
> around
On Mon, Oct 29, 2001 at 05:26:39PM +0100, allan wrote:
> > Have you considered using a hash of arrays instead?
> >
> > push @{$files{'.pl'}}, ':folder_one:byte.pl';
> > push @{$files{'.pl'}}, ':folder_one:byte.pl';
> > push @{$files{'.gif'}}, ':folder_one:some.gif';
> >
> > etc.
> >
> > Ronald
On Sun, Oct 28, 2001 at 01:24:35PM +0100, allan wrote:
> hi
> while traversing a filesystem i want to output a list of all files
> grouped by file extensions.
> this is no problem in itself but in the output i want the file names to
> appear in their correct sorted or nested order (which is in the
On Sun, Oct 14, 2001 at 01:00:15PM +0200, allan wrote:
> is it somehow possible - while slurping a file - to still keep track of
> the line numbers?
Not with the $. variable. $. holds the number of chunks read, which is the
number of lines only if $/ is "\n".
> something like:
>
> #!/usr/bin/
On Tue, Jul 31, 2001 at 04:46:59PM -0400, Adam Witney wrote:
>
> Hi,
>
> I have a file which contains about 45000 lines of 50 characters each. I want
> to reformat it to contain 60 characters each.
>
> I can read the whole file in and remove the line endings and then print out
> lines of 60 cha
On Fri, Jul 20, 2001 at 10:08:13PM +0200, allan wrote:
> i know theres more than one way to do it, but i would like a cleaner way.
> im trying to globally replace singlesqoutes with doubleqoutes and vice
> versa and the script below does seem to work but its rather an akward
> way to do it. is th
On Wed, Jun 20, 2001 at 10:04:13AM +0200, Sean Carte wrote:
> Add this line to the beginning of the script:
>
> $/ = '';
>
> That makes Perl ignore the newlines and makes the regexp work on the
> entire file.
Actually, setting $/ to '' puts Perl into paragraph mode, with blank lines
(i.e. cons
On Tue, Jun 19, 2001 at 11:33:27AM -0400, Brandon Barker wrote:
> I'm having trouble writing a script that will remove the regular
> expression "" in a text file in macperl. At first I thought I was
> making a programming mistake but I tried the same script in Linux and it
> worked as expected
On Mon, Mar 12, 2001 at 05:07:03PM +1100, John Murray wrote:
> Given you have $yearnum $monthnum $daynum as input, you want a dayname out
> of the array @monthdays defined below. Here's my untested [away from perl at
> moment] go:
>
> @daynames = ('mon','tue','wed','thu','fri','sat','sun');
> @mo
On Wed, Feb 07, 2001 at 01:22:18PM -0500, Jim Correia wrote:
>
> In particular, I want to nuke a program in mid-execution and have perl
> clean up as best as it can at this point, which includes flushing the
> buffers of any open files.
The easiest solution is to just turn on autoflush when the
16 matches
Mail list logo