On Sun, Dec 08, 2002 at 03:25:17PM +1100, Damian Conway ([EMAIL PROTECTED]) wrote:
[ Aren't you supposed to be taking a well-earned break? ]
Kate L Pugh wrote:
[hummous: kake]$ perl -MData::Dumper -we 'use strict; my $foo = [ -foo
]; print Dumper $foo'
$VAR1 = [
'-foo'
On Sun, Dec 08, 2002 at 11:13:17AM +, Dave Cross wrote:
On Sun, Dec 08, 2002 at 03:25:17PM +1100, Damian Conway ([EMAIL PROTECTED]) wrote:
set_lang( -name='Perl', -paradigm='hybrid', -motto='TMTOWTDI' );
I thought that was using = quotes its left-hand operand magic
quoting, not unary
[hummous: kake]$ perl -we 'use strict; print -foo . \n'
-foo
[hummous: kake]$
Its in common use too... Gtk.pm et al use it in the latter versions for
C enums. For example, The three arguments which specify the expand/shrink/fill
behaviour for a particular cell consist of an arrayref
Dave Cross wrote:
[ Aren't you supposed to be taking a well-earned break? ]
Yes, I am. I'm following a strict policy of only posting off-topic
to newsgroups. Hence I post about Perl here. ;-)
I thought that was using = quotes its left-hand operand magic
quoting, not unary - quotes its
I'm asking in the hope that someone has done something like this
before and can point me in the right direction.
Does anyone know how I'd go about finding out the time zone offset
for a given time zone name?
I know that most Unix boxes set the local time zone using some time
zone files...
On Sun, Dec 08, 2002 at 05:17:19PM +, Tamsin wrote:
Does anyone know how I'd go about finding out the time zone offset
for a given time zone name?
Time::Zone and Time::ZoneInfo look promising.
--
The future's bright, the future's orange!
You are Leon and I claim my five pounds.
--
On Sun, Dec 08, 2002 at 05:35:01PM +, David Cantrell wrote:
On Sun, Dec 08, 2002 at 05:17:19PM +, Tamsin wrote:
Does anyone know how I'd go about finding out the time zone offset
for a given time zone name?
Time::Zone and Time::ZoneInfo look promising.
The future's bright, the
You will also need the descriptions or the compiled (with zic(8)) versions,
for both of these versions. Presumably, though, these came with whatever
system you're using.
What is Zic(8) and how would I know if it is there or not?
I got Time::ZoneInfo running on OSX, but I had to put a zone.tab
On Sun, Dec 08, 2002 at 11:31:01AM +, Lusercop wrote:
I think that the definition of a word is /\b(\w+)\b/ and '-' will cause a
Why do you have the \b in there?
Paul (asking this for the second time in $short_period)
--
Paul Makepeace ...
use Time::Local;
$ENV{TZ}=Australia/Sydney;
my @gmt=gmttime;
my $tzdiff = timegm(@gmt)-timelocal(@gmt);
is the kludgey way to do it, $tzdiff is in seconds.
- Mark
On Sunday, December 8, 2002, at 05:17 pm, Tamsin wrote:
I'm asking in the hope that someone has done something like this
[beware of the cross-posting]
I decided what I was going to write, wrote it, but then ran out of
enthusiasm* and couldn't be bothered to munge it to fit the template.
However, because it may be of interest, what I wrote is below.
* - or more accurately, I had a crack-addled idea for a far less
On Sun, Dec 08, 2002 at 03:25:17PM +1100, Damian Conway wrote:
Kate L Pugh wrote:
[hummous: kake]$ perl -MData::Dumper -we 'use strict; my $foo = [ -foo
]; print Dumper $foo'
$VAR1 = [
'-foo'
];
[hummous: kake]$
Where's this documented?
The perlop
use Time::Local;
$ENV{TZ}=Australia/Sydney;
my @gmt=gmttime;
my $tzdiff = timegm(@gmt)-timelocal(@gmt);
is the kludgey way to do it, $tzdiff is in seconds.
gmttime was a deliberate error?
I was hoping for something a little more ... elegant.
But it works, (yay! thanks!).
Well to clarify it
On Sun, Dec 08, 2002 at 08:48:45PM +, Paul Makepeace wrote:
On Sun, Dec 08, 2002 at 11:31:01AM +, Lusercop wrote:
I think that the definition of a word is /\b(\w+)\b/ and '-' will cause a
Why do you have the \b in there?
In this case, becaues I didn't specify anything about where the
On Sun, Dec 08, 2002 at 11:16:54PM +, Lusercop wrote:
On Sun, Dec 08, 2002 at 08:48:45PM +, Paul Makepeace wrote:
On Sun, Dec 08, 2002 at 11:31:01AM +, Lusercop wrote:
I think that the definition of a word is /\b(\w+)\b/ and '-' will cause a
Why do you have the \b in there?
On Sun, Dec 08, 2002 at 08:36:56PM +, Tamsin wrote:
You will also need the descriptions or the compiled (with zic(8)) versions,
for both of these versions. Presumably, though, these came with whatever
system you're using.
What is Zic(8) and how would I know if it is there or not?
The
Nicholas Clark complained:
But barewords are not allowed under strict. So why is -bareword being allowed?
Because it's not a bareword. ;-)
No more than any of these are:
key = value;
$hash{ key }
qw( unbare );
In each case, a sequence of \w characters is marked as a string in some way.
On Mon, Dec 09, 2002 at 10:27:20AM +1100, Damian Conway wrote:
Nicholas Clark complained:
But barewords are not allowed under strict. So why is -bareword being allowed?
Because it's not a bareword. ;-)
But, but, but you said:
: The perlop manpage:
:
: Unary - performs arithmetic
On Sun, Dec 08, 2002 at 11:44:21PM +, Mark Blackman wrote:
Elegant it ain't.. In fact, there is a much nicer way via
C and the localtime libc function (at least in FreeBSD) where
localtime returns a tm struct with the final member
'gmtoff', GMT offset in seconds, but for some reason perl
and bitter experience tells me that you can't rely on these values being
correct or, indeed, based on any semblance of reality at all.
On Sun, 2002-12-08 at 23:54, Paul Makepeace wrote:
On Sun, Dec 08, 2002 at 11:44:21PM +, Mark Blackman wrote:
Elegant it ain't.. In fact, there is a much
(Thanks to everyone for their comments, and especially to Damian for
pointing me at the right bit of the manual.)
Damian quoted the perlop manpage:
If the operand is an identifier, a string consisting of a minus
sign concatenated with the identifier is returned.
Nick wrote:
But
Hello.
--
#!/usr/bin/perl -w
use strict;
use DBI;
my $db_name = test.db;
unlink $db_name;
my $dbh = DBI-connect( dbi:SQLite:dbname=$db_name, , );
my $table = test;
$dbh-do( CREATE TABLE $table ( foo LONGBLOB ) );
my $sth =
So, another maths exercise. I'll award a pint at the January social
meet for the first correct post with the next number in the sequence,
and another for an explanation of the sequence itself.
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 60
Good luck, :-)
- Chris.
--
$a=printf.net;
On Sun, 8 Dec 2002, Tamsin wrote:
I'm asking in the hope that someone has done something like this
before and can point me in the right direction.
In addition to following all the other useful comments that people have
already posted to this list, I'd like to suggest you might also consider
On Mon, 9 Dec 2002, Chris Ball wrote:
So, another maths exercise. I'll award a pint at the January social
meet for the first correct post with the next number in the sequence,
and another for an explanation of the sequence itself.
list-moderator-hat
New rule: no random guessing
On Sun, Dec 08, 2002 at 11:54:11PM +, Paul Makepeace wrote:
FWIW, intuition tells me, if I were doing this, to look at tzset(3).
#!/usr/bin/perl -w
use strict;
use Inline C = 'EOC';
#include time.h
#include stdlib.h
#include stdio.h
int tz_offset(char *tz) {
extern long timezone;
On Sun, Dec 08, 2002 at 11:27:09PM +, Lusercop wrote:
6 - Games
The maddest bit of it all is that games have their own man page section
-- even on commercial unixes. What the hell?
I mean, take section 2 for instance, it could be split up. Then take 3,
it _needs_ split up, but oooh no, we
On Mon, 9 Dec 2002, Mark Fowler wrote:
I don't know, showing this to a load of Perl coders. Of course we're
not going to try and work it out, we're going to try and hack the
system. This is such an incitement for a script that sends all the
numbers from one to hundred thousand to the list
On Sun 08 Dec 2002, Chris Devers [EMAIL PROTECTED] wrote:
Consider the word wored 'chewed'. It has two personal pronouns in it --
'he' and 'we'. Can you find a six letter word that has six pronouns it it?
You utter, utter bastard. Look what you made me do:
29 matches
Mail list logo