Cort Morgan wrote:
>
> I'm trying to (learn how to) create a mega-widget in Perl/Tk and am hacking
> some examples from "Mastering Perl/Tk". I apparently do not understand how to
> use ConfigSpecs. I'm trying to be able to pass arguments to the widget
> constructor and define default values if t
Hi,
I'm trying to (learn how to) create a mega-widget in Perl/Tk and am hacking
some examples from "Mastering Perl/Tk". I apparently do not understand how to
use ConfigSpecs. I'm trying to be able to pass arguments to the widget
constructor and define default values if the arguments are not s
[EMAIL PROTECTED] schreef:
> How do I round off a decimal to the next nearest whole digit ,
> example
> 0.123 = 1,
> 1.23 = 2,
> 4.7312 = 5, etc etc.
Define "next".
You can use POSIX::ceil(),
but then -1.23 becomes -1 and you might want -2 there?
$ echo -1.23 4.1 5 |perl -MPOSIX -nwle'print
"John W. Krahn" schreef:
> [EMAIL PROTECTED] wrote:
>> The following Perl one-liner will do what you need
>> perl -n -e 's/(.{8,8}).(.*)/$1$2/;print ;'
>
> Or more simply as:
>perl -pe's/^(.{8})./$1/'
And a bit less simply as:
perl -pe's/(?<=.{8}).//'
--
Affijn, Ruud
"Gewoon is een
On Aug 8, 8:52 am, [EMAIL PROTECTED] (Pablo Zea Aranibar) wrote:
.
.
> If you can give some directions, just a path to follow, it would be
> appreciated.
Usually, a module that uses a C library assumes that the C library has
already been built. And it links to that existing library. (This is
the a
On 6 Aug., 14:05, [EMAIL PROTECTED] (Rob Coops) wrote:
> You are almost right, since it prints all lines all lines match.
>
> Could you explain what it is that you are trying to match, that way people
> might be able to help getting the regex right.
i forgot about this thread, since it took so lon
On 6 Aug., 16:45, [EMAIL PROTECTED] (Yitzle) wrote:
> On Wed, Aug 6, 2008 at 4:29 AM, Kenneth Brun Nielsen
> <[EMAIL PROTECTED]> wrote:
> > Within a perl program, I want to go to a particular mode when a
> > keyword is found. The keyword is a regexp.
>
> > E.g.
> > #!/usr/bin/perl -w
> > open FILE