On 4/13/07, carol white <[EMAIL PROTECTED]> wrote:
I want to use 2 modules in my perl program: module1.pm and module2.pm.
module1.pm is in current directory. to use module2.pm which is in another
directory I wil use: use lib 'path-to-other-directory';
but I have another module named module1.pm i
Typos wrote:
> Hello everyone,
Hello,
> I'm a Perl beginner and I've been trying for a while to to insert an array
> in to the middle of another array
perldoc -f splice
> after a certain pattern.
More difficult. You first have to determine at what array index the pattern
exists.
> Here is wh
On 4/13/07, carol white <[EMAIL PROTECTED]> wrote:
Hi,
I want to use 2 modules in my perl program: module1.pm and module2.pm.
module1.pm
is in current directory. to use module2.pm which is in another directory I wil
use: use lib
'path-to-other-directory'; but I have another module named module1
On 4/13/07, yitzle <[EMAIL PROTECTED]> wrote:
snip
> @record{qw(firstName lastName field3 field4)} = split /\t/;
This line sorta confuses me.
Now record is treated as an array? An array element which is a hash?
On the next line, you push it as a hash onto @data. This makes an array of
hashes?
sn
Hi,
I want to use 2 modules in my perl program: module1.pm and module2.pm.
module1.pm is in current directory. to use module2.pm which is in another
directory I wil use: use lib 'path-to-other-directory';
but I have another module named module1.pm in the same directory as module2.pm
that I don't
> "Andreas" == Andreas Puerzer <[EMAIL PROTECTED]> writes:
Andreas> Maybe the OP could use CPANPLUS, which offers the desired
Andreas> uninstall-functionality.
If CPANPLUS offers uninstall, it lies about it. The same limitations
apply. At least CPAN.pm is honest about not providing it.
Yet
Random guess : search PerlDoc for Encoding.
http://perldoc.perl.org/Encode.html
*$octets = encode(ENCODING, $string [, CHECK])
*
$octets = encode("iso-8859-1", $string);
*$string = decode(ENCODING, $octets [, CHECK])*
On 4/13/07, xavier mas <[EMAIL PROTECTED]> wrote:
Hi list,
Anyone knows
Hi list,
Anyone knows if threre is anyway to encode/ decode a string from one encoding
type to another (from iso-8859-15 to utf8, for instance)?
Greetings,
--
Xavier Mas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello everyone,
I'm a Perl beginner and I've been trying for a while to to insert an array
in to the middle of another array after a certain pattern.
Here is what I'm trying to do...I have the Linux Iptables configuration
file, which has a custom chain called MAC which hold all the IP to MAC
entr
BANG!
There's no need to assign names to array indices when you have Perl's hash
structure. Suppose your data is tab-separated, you could write:
my @data;
while (<>) {
my %record;
@record{qw(firstName lastName field3 field4)} = split /\t/;
push @data, \%record;
}
or something similar. No
from the docs for tell:
The return value of tell() for the standard streams like the
STDIN depends on the operating system: it may return -1 or
something else. tell() on pipes, fifos, and sockets usually
returns -1.
The short answer is you
(Randal L. Schwartz) schrieb:
>>"yaron" == yaron <[EMAIL PROTECTED]> writes:
>
>
> yaron> I am using cpan to install modules.
> yaron> From time to time I have to uninstall a module.
> yaron> Untill now I did not find a tool to do it.
> yaron> Is there an official tool for this?
>
> No,
yitzle wrote:
Rob Dixon wrote:
yitzle wrote:
Don't shoot me!
I can't find enum on the perldocs. Perl does have an enum, right?
How do I go about making an enum? I basically want a bunch of
variables to equal subsequent values, eg 0, 1, 2, ...
Perl doesn't provide enum natively. But it's a
On 4/13/07, oryann9 <[EMAIL PROTECTED]> wrote:
>
> It works fine with 5.8.8 on my Fedora Core 5:
>
> $ perl -e 'for ("","abc\n","def","hij\n"){print;
> warn tell STDOUT,"\n"}'
> 0
> abc
> 4
> 7
> defhij
> 11
> $
>
Does not seem to be accurate on this platform???
$ uname -a
CYGWIN_NT-5.1 dubmds
>
> It works fine with 5.8.8 on my Fedora Core 5:
>
> $ perl -e 'for ("","abc\n","def","hij\n"){print;
> warn tell STDOUT,"\n"}'
> 0
> abc
> 4
> 7
> defhij
> 11
> $
>
Does not seem to be accurate on this platform???
$ uname -a
CYGWIN_NT-5.1 dubmdsmith10 1.5.24(0.156/4/2)
2007-01-31 10:57 i686
The "problem" is thus.
I an reading in data and using split to get it to an array.
Each element/column has a specific meaning, eg firstName, lastName etc
Rather than using [0], [1] I figured I could set up an enum($firstName,
$lastName, etc)
I suppose the alternative is to define (constant or vari
On Thu, 12 Apr 2007 19:11:47 -0700, John W. Krahn wrote:
> Rob Dixon wrote:
>> yitzle wrote:
>>>
>>> OK... I got this script that gets a lot of hits -> generates high
>>> bandwidth.
>>> Is there a simple way to check the amount of bytes printed to STDOUT so I
>>> can track the bandwidth it is gener
On 13 Apr 2007 at 6:28, [EMAIL PROTECTED] wrote:
> Hi,
>
> I am using cpan to install modules.
> From time to time I have to uninstall a module.
> Untill now I did not find a tool to do it.
> Is there an official tool for this?
>
Try this. It's not a tool but it is the "Offical" way to remov
> "yaron" == yaron <[EMAIL PROTECTED]> writes:
yaron> I am using cpan to install modules.
yaron> From time to time I have to uninstall a module.
yaron> Untill now I did not find a tool to do it.
yaron> Is there an official tool for this?
No, because the CPAN.pm shell is an installer, not a
I
2007/4/13, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Hi,
I am using cpan to install modules.
From time to time I have to uninstall a module.
Untill now I did not find a tool to do it.
Is there an official tool for this?
Hello,
I don't think there is such an uninstall tool for you.
by the way,
Hi,
I am using cpan to install modules.
>From time to time I have to uninstall a module.
Untill now I did not find a tool to do it.
Is there an official tool for this?
Thanks in advanced,
Yaron Kahanovitch
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
yitzle wrote:
Don't shoot me!
I can't find enum on the perldocs. Perl does have an enum, right?
How do I go about making an enum? I basically want a bunch of variables to
equal subsequent values, eg 0, 1, 2, ...
Perl doesn't provide enum natively. But it's a solution to a problem, so perhaps
y
John W. Krahn wrote:
Rob Dixon wrote:
yitzle wrote:
OK... I got this script that gets a lot of hits -> generates high
bandwidth.
Is there a simple way to check the amount of bytes printed to STDOUT so I
can track the bandwidth it is generating?
my $nbytes = tell STDOUT;
tell() usually onl
23 matches
Mail list logo