> I don't claim to be a master, but you can do something along the lines of:
>
> $range = '4.3:8.3';
> $range =~ /(\d+).(\d+).(\d+).\2/ and print map "$_.$2 ", $1 .. $3;
>
> Since it appears you require that the fractional part be the same for both
> ends of the range
On 8/29/2004 2:36 AM, Bryan Harris wrote:
I don't claim to be a master, but you can do something along the lines of:
$range = '4.3:8.3';
$range =~ /(\d+).(\d+).(\d+).\2/ and print map "$_.$2 ", $1 .. $3;
Since it appears you require that the fractional part be the same for both
ends of the range,
Make another field in DB and call it "active" or something. Set it by
default to "0". Then you will activate it by setting active="1" for that
record.
Sergei.
"Maxipoint Rep Office" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> this is good idea, but in some cases I must have m
From: Philipp Traeder <[EMAIL PROTECTED]>
> You're right - the problem I'm trying to solve is quite restricted -
> and I'm very thankful for this ;-) Basically, I'm trying to write an
> application that "recognizes" log file formats, so that the following
> lines are identified as several manifesta
From: Philipp Traeder <[EMAIL PROTECTED]>
> I'm facing a roughly similar problem at the moment, and I was planning
> on using String::Compare or something like it for comparing strings
> char by char. Taking a first glance at the code, it doesn't look too
> hard to modify it in a way that it return
Hi,
I had the following task: Open a file, read it and merge all pairs of lines containing
a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines should remain
untouched. Expected result:
Blablab
Jan Eden wrote:
I had the following task: Open a file, read it and merge all pairs
of lines containing a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines
should remain untouched. Expected result:
B
Jan Eden wrote:
Hi,
Hello,
I had the following task: Open a file, read it and merge all pairs of lines containing
a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines should remain
untouched. Expec
Jan Eden <[EMAIL PROTECTED]> wrote:
: I had the following task: Open a file, read it and merge all
: pairs of lines containing a certain number of tabs. Example:
:
: Blablabla
: abc cab bca
: 123 453 756
: Blablabla
: Blablabla
:
: Here, lines 2 and three should be merged, while the other
: line
Jan Eden wrote:
Hi,
Hello again,
I had the following task: Open a file, read it and merge all pairs of lines containing
a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines should remain
untouched.
Hi,
I'm a newbie to Perl, see if anyone of you can kindly help?
How should I add 8 hours to a date-time variable that's keeping the unix time?
Thanks, CHAN
Hi,
See if anyone out there can help again.
Is there a Perl function for escape special characters in a variable easily? So I
don't need to use s/../... explicitly for each of them?
Thanks, Yw
Yw Chan ( Cai Lun e-Business ) <[EMAIL PROTECTED]> wrote:
: Hi,
:
: See if anyone out there can help again.
:
: Is there a Perl function for escape special characters in
: a variable easily? So I don't need to use s/../...
: explicitly for each of them?
Which special characters are you refer
Yw Chan ) wrote:
> How should I add 8 hours to a date-time variable that's keeping the
> unix time?
$var + 8 * 60 * 60
Depending on format, you may need to parse the string first, using for
instance the Date::Parse module.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Yw Chan ) wrote:
> Is there a Perl function for escape special characters in a
> variable easily?
Yes.
You are supposed to look it up in "perldoc perlfunc" yourself rather
than asking others to do so for you.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscri
Hi,
thanks for all the suggestions. I originally tried to avoid slurping the whole file
into memory, but got stuck using the $. variable to address a line and the one
following it.
Thanks John and Gunnar for pointing me to the right direction, and thanks to Charles
for his extensive comments.
16 matches
Mail list logo