Dear all!
I'm writing a module (strictly for in-house use!) for
converting an in-house legacy encoding -- from the time when
you had to fake the ordinary alphabet + whatever special
characters you needed onto the 223 characters of whatever
8-bit encoding your OS happened to support -- to
On 3/11/07, Benct Philip Jonsson [EMAIL PROTECTED] wrote:
snip
:use HTML::Entities;
:
:sub transliterate ($;$){ my($text,$option) = @_;
:
:# Begin troblesome part!
:if($option ref $option ne 'HASH'){
:die The second argument to transliterate() must
:
Hello there, I'm having trouble constructing a regular expression that
would do the following:
FOO...
...followed by anything but BAR (non-greedy)...
...followed by BAZ (captured)...
...followed by anything but BAR (greedy)...
...followed by BAR
I've been looking at zero-width negative
On 3/12/07, Dave Cardwell [EMAIL PROTECTED] wrote:
Hello there, I'm having trouble constructing a regular expression that
would do the following:
FOO...
...followed by anything but BAR (non-greedy)...
...followed by BAZ (captured)...
...followed by anything but BAR (greedy)...
...followed by
On 3/12/07, Chas Owens [EMAIL PROTECTED] wrote:
The key here is zero-width. These constructs do not consume any
characters, so they must be combine with patterns that do:
/^FOO(?!BAR).*?(BAZ)(?!BAR).*BAR/
However, this will only work if BAR directly follows FOO. This string
will still
On 3/12/07, Chas Owens [EMAIL PROTECTED] wrote:
On 3/12/07, Chas Owens [EMAIL PROTECTED] wrote:
The key here is zero-width. These constructs do not consume any
characters, so they must be combine with patterns that do:
/^FOO(?!BAR).*?(BAZ)(?!BAR).*BAR/
However, this will only work if BAR
Hi,
When I ask for the filehandle position (tell) it is reporting the
pointer as being a few bytes further along than I expect it to be.
For instance if I do this:
#!/bin/perl
use strict;
use warnings;
my ($start,$d,$var);
my $file = 'myjpeg.jpg';
open(FH,$file) or die Can't open $file:
Dave Cardwell wrote:
Hello there, I'm having trouble constructing a regular expression that
would do the following:
FOO...
...followed by anything but BAR (non-greedy)...
...followed by BAZ (captured)...
...followed by anything but BAR (greedy)...
...followed by BAR
I've been looking at
On 3/12/07, Beginner [EMAIL PROTECTED] wrote:
When I ask for the filehandle position (tell) it is reporting the
pointer as being a few bytes further along than I expect it to be.
binmode(FH);
while (FH) {
If it's a binary file, you shouldn't read it by lines, which is what
this does. You
Chas Owens wrote:
On 3/12/07, Chas Owens [EMAIL PROTECTED] wrote:
On 3/12/07, Chas Owens [EMAIL PROTECTED] wrote:
The key here is zero-width. These constructs do not consume any
characters, so they must be combine with patterns that do:
/^FOO(?!BAR).*?(BAZ)(?!BAR).*BAR/
However, this
On 12 Mar 2007 at 9:34, Tom Phoenix wrote:
On 3/12/07, Beginner [EMAIL PROTECTED] wrote:
When I ask for the filehandle position (tell) it is reporting the
pointer as being a few bytes further along than I expect it to be.
binmode(FH);
while (FH) {
If it's a binary file, you
Rob Dixon wrote:
Dave Cardwell wrote:
Hello there, I'm having trouble constructing a regular expression that
would do the following:
FOO...
...followed by anything but BAR (non-greedy)...
...followed by BAZ (captured)...
...followed by anything but BAR (greedy)...
...followed by BAR
I've
Beginner wrote:
Hi,
When I ask for the filehandle position (tell) it is reporting the
pointer as being a few bytes further along than I expect it to be.
For instance if I do this:
#!/bin/perl
use strict;
use warnings;
my ($start,$d,$var);
my $file = 'myjpeg.jpg';
open(FH,$file) or die Can't
Hello,
I'm having a lot of trouble figuring out how to remove blank lines
from my HTML. The lines are generated by my shopping cart. I use
(and highly recommend) interchange:
http://www.icdevgroup.org
I basically want to wrap all of my code in [filter
no_blank_lines][/filter].
On 12 Mar 2007 at 11:09, Grant wrote:
Hello,
I'm having a lot of trouble figuring out how to remove blank lines
from my HTML. The lines are generated by my shopping cart. I use
(and highly recommend) interchange:
http://www.icdevgroup.org
I basically want to wrap all of my code in
Dave Cardwell wrote:
Rob Dixon wrote:
Dave Cardwell wrote:
Hello there, I'm having trouble constructing a regular expression
that would do the following:
FOO...
...followed by anything but BAR (non-greedy)...
...followed by BAZ (captured)...
...followed by anything but BAR (greedy)...
-Original Message-
From: Beginner [mailto:[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 11:16
To: beginners@perl.org
Subject: Re: Removing blank lines
On 12 Mar 2007 at 11:09, Grant wrote:
Hello,
I'm having a lot of trouble figuring out how to remove blank lines
from
Rob Dixon wrote:
Dave Cardwell wrote:
Rob Dixon wrote:
Dave Cardwell wrote:
Hello there, I'm having trouble constructing a regular expression
that would do the following:
FOO...
...followed by anything but BAR (non-greedy)...
...followed by BAZ (captured)...
...followed by anything but BAR
Grant wrote:
Hello,
I'm having a lot of trouble figuring out how to remove blank lines
from my HTML. The lines are generated by my shopping cart. I use
(and highly recommend) interchange:
http://www.icdevgroup.org
I basically want to wrap all of my code in [filter
no_blank_lines][/filter].
I'm trying to extract a single variable from a page like
http://www.weather.gov/data/current_obs/KDMH.xml. This is the National
Weather Services current observations for Baltimore's Inner Harbor. I'm
just interested in the data enclosed by temp_f tags, the current
temperature. I just want to get
Hello,
I'm having a lot of trouble figuring out how to remove blank lines
from my HTML. The lines are generated by my shopping cart. I use
(and highly recommend) interchange:
http://www.icdevgroup.org
I basically want to wrap all of my code in [filter
Wagner, David --- Senior Programmer Analyst --- WGO wrote:
-Original Message-
From: Beginner [mailto:[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 11:16
To: beginners@perl.org
Subject: Re: Removing blank lines
On 12 Mar 2007 at 11:09, Grant wrote:
Hello,
I'm having a lot of
I'm having a lot of trouble figuring out how to remove blank lines
from my HTML. The lines are generated by my shopping cart. I use
(and highly recommend) interchange:
http://www.icdevgroup.org
I basically want to wrap all of my code in [filter
no_blank_lines][/filter]. no_blank_lines
On 3/12/07, Beginner [EMAIL PROTECTED] wrote:
What I am tring to do is find the x and y dimension of a jpeg
Ah, Image::Size.
http://search.cpan.org/~rjray/Image-Size-3.01/lib/Image/Size.pm
Enjoy!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I am using Perl within web pages created at the DBMS site www.baseportal.com.
So, when Perl executes, it executes at their site and not mine.
As a consequence, I am unable to download and install anything, period.
I am creating interesting (for me that is) applications at this site.
But I would
On 12 Mar 2007 at 10:49, Tom Phoenix wrote:
On 3/12/07, Beginner [EMAIL PROTECTED] wrote:
What I am tring to do is find the x and y dimension of a jpeg
Ah, Image::Size.
http://search.cpan.org/~rjray/Image-Size-3.01/lib/Image/Size.pm
Enjoy!
Image::size Image::Info and the
On 3/12/07, Bary Gold [EMAIL PROTECTED] wrote:
I am using Perl within web pages created at the DBMS site www.baseportal.com.
So, when Perl executes, it executes at their site and not mine.
As a consequence, I am unable to download and install anything, period.
Not ANYTHING anything, not even
Grant wrote:
I'm having a lot of trouble figuring out how to remove blank lines
from my HTML. The lines are generated by my shopping cart. I use
(and highly recommend) interchange:
http://www.icdevgroup.org
I basically want to wrap all of my code in [filter
no_blank_lines][/filter].
Have the data in an array and do
i = 0;
foreach (@text) { $text2[i++] = $_ if (! m/^\s$/); }
On 3/12/07, Rob Dixon [EMAIL PROTECTED] wrote:
Grant wrote:
I'm having a lot of trouble figuring out how to remove blank lines
from my HTML. The lines are generated by my shopping cart. I use
On 3/12/07, yitzle [EMAIL PROTECTED] wrote:
Have the data in an array and do
i = 0;
foreach (@text) { $text2[i++] = $_ if (! m/^\s$/); }
If you had remembered to put a dollar sign on $i, you'd be reinventing grep:
my @text2 = grep ! /^\s$/, @text;
Cheers!
--Tom Phoenix
Stonehenge Perl
$val =~ s/^\s*\n//mg;
I'm not having any luck there either. I'm not sure what is actually
creating the blank lines. It could be spaces, tabs, or some other
blank line creator.
The \s marker will match all of those. Can you show us your code please?
Don't forget that your function is
On 3/12/07, Zembower, Kevin [EMAIL PROTECTED] wrote:
I'm trying to extract a single variable from a page like
http://www.weather.gov/data/current_obs/KDMH.xml. This is the National
Weather Services current observations for Baltimore's Inner Harbor. I'm
just interested in the data enclosed by
From: Zembower, Kevin [EMAIL PROTECTED]
I'm trying to extract a single variable from a page like
http://www.weather.gov/data/current_obs/KDMH.xml. This is the National
Weather Services current observations for Baltimore's Inner Harbor. I'm
just interested in the data enclosed by temp_f tags,
On 3/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi All
I am updataing an application that includes a section which has a number
of strings created on a WEB page and escaped with Javascript escape before
being sent to a perl script. The original application had a custom
unescape function
Hi all,
I was trying to write a script. I wanted to use multiple characters in
command line switches.
For example
myScript -f1 file1 -f2 file2
now getopt or getopts allows only for single character switches (please
correct me if its not true).
Is there any module which will allow my to have
I recently forgot about the unlink function and had been trying to
remove files using the less efficient system call to run rm -f
/path/to/files. I found, however, that this didn't work at all.
I've since replaced it with unlink and get the results one can expect to
get so it isn't a matter of
Hi all,
I was trying to write a script. I wanted to use multiple characters in
command line switches.
For example
myScript -f1 file1 -f2 file2
now getopt or getopts allows only for single character switches (please
correct me if its not true).
Is there any module which will allow my to have
You can access the command line parameters directly without any module
with @ARGV.
Not sure if this helps.
myScript -f1 file1 -f2 file2
Something like this might work:
for ( $i = 0; $i [EMAIL PROTECTED] - 1; $i += 2 ) {
hash{AGV[$i]} = AGV[$i + 1];
}
print FIle 1: $hash{'-f'};
On 3/13/07,
I recently forgot about the unlink function and had been trying to
remove files using the less efficient system call to run rm -f
/path/to/files. I found, however, that this didn't work at all.
I've since replaced it with unlink and get the results one can expect to
get so it isn't a matter of
Where you doing rm -f $file or `rm -f $file`?
You need to use backticks for system commands.
On 3/13/07, Mathew [EMAIL PROTECTED] wrote:
I recently forgot about the unlink function and had been trying to
remove files using the less efficient system call to run rm -f
/path/to/files. I found,
40 matches
Mail list logo