Thanks.
-Original Message-
From: $Bill Luebkert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 17 September 2003 1:49 PM
To: [EMAIL PROTECTED]
Cc: Perl
Subject: Re: Access to current directory
Mohammed Khatib wrote:
> Does anyone know a way of accessing the current working direct
>Is there a way to determine the type of a reference at runtime ?
Sure is. Use the 'ref' function.
e.g.
if (ref($pointer) eq "HASH")
{
...
}
See http://www.perldoc.com/perl5.6.1/pod/func/ref.html for more detail.
MK.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
erl
Subject: Re: Class variables
Mohammed Khatib wrote:
> Dear Perl people,
>
> I'm just wondering about the set up of class variables in a Perl class.
> Say I have something like the following:
>
> ==
> sub new
> {
> # fetch class name
>
Dear Perl people,
I'm just wondering about the set up of class variables in a Perl class.
Say I have something like the following:
==
sub new
{
# fetch class name
my $class = shift;
# create object
my $self = {
_path => shift,
};
# open input
Hi Everyone,
I've been working on a program which handles large amounts of data (around
400MB of Folio markup) and builds data structures from this input.
The program makes heavy use of hashes of hashes, arrays of hashes and all
that stuff and stores large amounts of data in those data structures
Basil,
You mention that:
"One also must take the time to understand HOW the module works"
I think that this sends out the wrong message to beginners who are already
afraid of using modules. The whole point of using a module is that you don't
need to know HOW it works, only WHAT it does. That is
Hi Everyone,
I'm looking for a function in Perl that is equivelant to C's "switch"
function, where multiple conditionals (sort of like multiple "elsif"
statements, only more compact and neater) can be set out and action taken on
each chosen option.
Does anyone know of such a function in Perl?
Th
> -Original Message-
> From: Mohammed Khatib
> Sent: 18 November 2002 01:00
> Subject: Coding style filter
> I am thinking of writing a coding style filter for the Perl
> programs that we develop here; possibly one that can be
> customised (by setting out different stand
Hello everyone,
I need to develop some modules to parse and provide useful
information about RTF documents. All I need to do at the
moment is extract titles names, the number of pages of each
RTF, and obtain summaries which have specific Word level
styles applied. I've had a look at Win32::OLE, b
Hi Everyone,
When I started working here (TimeBase) 2 years ago, the
programmers had not a hint of coding standards when
developing their programs. I started to spread the word of
coding standards and their importance, and now things have
improved, but their still not good enough.
I'll soon be d
Thanks.
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> On Behalf Of $Bill
> Luebkert
> Sent: Thursday, May 23, 2002 4:11 PM
> To: [EMAIL PROTECTED]
> Cc: Perl
> Subject: Re: Using the 'g' modifier with regexs
>
Hi All,
A simple question (but this had me baffled for ages today).
Take a statement such as the following:
if (s!($string)!!g)
{
# code
}
Since we are using the g modifier in the substitution, is
there a way to access an array or something which holds all
the captured matches (assuming th
Hi Everyone,
I was looking through the list of Perl special variables but couldn't find a
variable that holds the name of the current module/package (maybe I'm blind
or just didn't look hard enough).
I want to say something like:
die "\n(package name) blah blah blah"
where (package name) is th
ts 'Ba'
> print ++($foo = 'zz'); # prints 'aaa'
>
> The auto-decrement operator is not magical.
>
>
> The last line is what you were missing.
>
> --
> Mike Arms
>
>
> > -Original Message-
> > From
Hi All,
The following code prints out the letter "h" to the screen, as expected.
$test = "g";
print ++$test;
The code below, however, prints out the number -1, when I expect it to print
the letter "f".
$test = "g";
print --$test;
Is this a Perl bug???
I've already worked around this problem
Dear All,
I was just wondering if it was possible to write ColdFusion custom CFX tags
using Perl?
One of our ColdFusion programmers has a request for a Perl program which he
would like to integrate into ColdFusion code.
We know it's possible to use C with CF, but Perl is the language of
preferen
e or too
lazy to look things up yourself, then you are wasting our time as well as
yours.
--
Hank Barta
At The Hull Group, Chicago
(312) 655-4636
-Original Message-
From: Mohammed Khatib [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 11:37 PM
To: Toby Stuart; 'Gregg R. A
>How is this more complete? It's the exact same regex,
>except for the case-insensitivity!
Yep, I agree.
> if ($file =~ /.*script.*\.exe$/i) {
The .* at the beginning is absolutely not necessary.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeffrey
- Original Message -
From: "Mohammed Khatib" <[EMAIL PROTECTED]>
To: "Perl" <[EMAIL PROTECTED]>
Sent: Thursday, January 17, 2002 1:04 AM
Subject: @INC
> Hi Everyone,
>
> I'm writing a program in which I want to add to the @INC array
BEFORE
> anything
I asked about @INC a good week and a half ago..
What's wrong with the ActivePerl e-mail server??
Mk
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brent Dax
Sent: Thursday, January 17, 2002 7:33 PM
To: [EMAIL PROTECTED]; Perl
Subject: RE: @INC
[EM
Hi Everyone,
I'm writing a program in which I want to add to the @INC array BEFORE
anything else in the program. The reason why I want to do this is because
one of the modules I want to use is located at:
p:\PERL\TimeBase\Folio\Utilities.pm
This is the code I'm using, but Perl tells me that it
Hi All,
I have something similar to the following:
@legn = procLegn(\@legn);
sub procLegn
{
my @legn = ?;
code.
}
I'm trying to dereference the pointer (\@legn) which was passed to the
sub-routine.
How do I do that?
Thanks in advance,
Mohammed
<>
ROTECTED]]
Sent: Wednesday, January 16, 2002 1:01 PM
To: [EMAIL PROTECTED]
Cc: Perl
Subject: Re: $/ special var.
Mohammed Khatib wrote:
> Hi All,
>
> Just wondering, if I specify $/ = "string" in the main body of a program,
> does the value of $/ carry on if I call a sub-routi
Thanks for your help.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Peter
Vogel
Sent: Wednesday, January 16, 2002 12:13 PM
To: 'Mohammed Khatib '; 'Perl '
Subject: RE: $/ special var.
All the perl special vars are global
Yeah, I did.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, December 22, 2001 4:33 AM
To: [EMAIL PROTECTED]
Subject: PERL TK
Anyone ever get PERL TK to run on Windows? Kim Zuber SEPG PVCS Support ext.
1048
__
Hi All,
Can you use the File::Find method "find" by specifying a sub-routine other
than "wanted" as the first method arg?
For example:
###
find(\&delete, 'c:\temp');
sub delete
{
# code
}
###
Thanks,
Mk
<>
Hi Gurus,
I've got the following "if" statement in my program:
if ($rec =~ m!^tableofstatutoryrules((-table)?)((\d+)?)$!i)
Note that the ((-table)?)((\d)?) section is optional, but if it matches, I
want to be able to capture the \d+ in variable $4, WITHOUT receiving a
warning when it doesn't ma
Hi everyone,
I'm currently writing a program where I'm reading in a file line by line,
and there are instances in the program where I need to "rewind" the position
in the file to the position of the last read. How can I do this?
Thanks,
Mk
<>
PM
To: Perl
Subject: System commands
Mohammed Khatib writes:
> Hi All,
>
> I need to call a command line application (called LinkD) from my perl
> program. What I need is the output string that LinkD outputs to the
screen
> so I can use it in my program, but at the same time, I
Hi All,
To check if a file exists, we use the expression "-e filename". I was
wondering whether there was a similar function for determining if a
directory existed?
Knowing Perl, I'm sure this isn't very hard to do.
Thanks in Advance,
Mk
<>
We get the message hold you horses!
hahahhahhahaman.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of web tur
Sent: Tuesday, December 11, 2001 7:05 AM
To: [EMAIL PROTECTED]
Subject: some times I am losing all data
Dear Sirs,
I am using follo
31 matches
Mail list logo