Hello,
i'm struggling around with umlauts in my xml files, which i want to
parse with XML::Rabbit.
I've got the same behaviour with __DATA__ or when i'm reading a xml file
via MyNode->new(file => );
And i've got non idea what i am doing wrong :(
(ps: yes, the testcase is utf8 encoded acording
and hashes are not sorted, like lists are.
Martin
Am 31.07.2015 um 08:28 schrieb Uday Vernekar:
> Hashes are complex list data, like arrays except they link a key to a
> value.
> Hashes can be used for counting, uniqueness, searching, and dispatch and
> lot more than just mapping from one thing t
good luck with it!
Am 01.07.2015 um 18:40 schrieb bikram behera:
> Hi Team,
>
> I am new in perl , i want to learn perl.
>
> Thanks,
> Bikram Behera
>
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hi Shlomi, Everyone
On 12:38:40 08/08/2012 Shlomi Fish wrote:
> perl-5.10.1 is very old and no longer actively maintained. There's
> already perl-5.16.0. List::MoreUtils is at version 0.33:
> https://metacpan.org/release/List-MoreUtils .
I am aware that this perl is quite an old one. But for me I
Hello Everyone,
I am slightly confused...
I've got a Centos 6.3 Installation with its perl (version 5.10.1) and i am
Using the Module List::MoreUtils which comes with the Linux Distribution.
[root@bach perl-lib]# cd /tmp/
[root@bach tmp]# perl -MList::MoreUtils -MData::Dumper -wle 'print Dumper
> > $::Foo::a
>
> This is a shortcut for $main::Foo::a
% perl -e 'package Foo; $a = 2; print $::Foo::a'
2%
% perl -e 'package Foo; $a = 2; print $Foo::a' 2%
2
so every package is a "subpackage" of main?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hello,
whats the difference if you start a variable with ::
for example:
$::a
$a
$main::a
or:
Package Foo;
$::a # <- this is still main?!
$::Foo::a
$Foo::a
$a
didn't found information in the perldoc.
Regards Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-
Hey,
> print "$array[0],$array[1],$array[2]"; etc.
There are different ways:
1) print @array;
usually you want to see which element is at which index so
2) print join(" - ", @array);
is maybe better.
HTH
Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai
what about qr()?
have a look at perldoc perlop if it fits your needs.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
idual Software Solutions - UMO
> T-Systems India Private Limited, Pune
> Telephone: +91-20-30245000/25605000 (Extn: 5271)
> Mobile: +91 9822 854 227
> Fax: +91-020 25674090
> Internet: http://www.t-systems.com
>
>
> -Original Message-
> From: Martin Barth [mailto:[EMAIL PR
this command is
> there. If I don't execute this command then entire task would fail.
> So it's very important that I should set this variable with proper
> value and then start the execution of the task.
>
> Regards,
> Irfan
>
>
> -Original Message-
&
,
> Irfan
>
> -Original Message-
> From: Martin Barth [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 17, 2008 1:01 PM
> To: beginners@perl.org
> Subject: RE: setting unix command through perl script
>
> Hi
>
> your "command" is executed. it chan
>
> Try to do everything you need to do inside the perl script, or
> everything
> you need to do outside the perl script.
>
> HTH,
> Ken Wolcott
>
>
> On Wed, Apr 16, 2008 at 5:31 AM, Martin Barth <[EMAIL PROTECTED]>
> wrote:
>
> > i think this is not possib
i think this is not possible.
if you start a new process (shell) it gets the environment of its parent
process. but if you manipulate the environment in a child the parent will
not notice this..
for example
$ bash
$ export FOO=BAR
$ echo $FOO
BAR
$ exit
$ echo $FOO
Regards Martin
On 14:20:18
On 12:33:09 11/02/2008 "Allam Reddy, Thomas" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I have a string "jdbc/abc.xml" which I wanted to tokenize using the
> delimiter "/"
> May I know the perl code for this?
>
> Thanks
> Thomas Reddy
hi,
you could use split in this situation.
@tokens = split(/\
> #!/opt/perl/bin/perl -w
> use strict;
>
> #variable
>
> my @horcm_file;
>
>
> sub readdata{
> open(HORCM, "/etc/horcm10.conf") || die ("File error");
> @horcm_file = ;
> chomp(@horcm_file);
> close(HORCM);
> return(@horcm_file);
> }
>
> my @pipo=readdata();
>
> foreach (@pipo){
>
On 0:59:22 08/01/2008 "Robert Citek" <[EMAIL PROTECTED]> wrote:
> How can I get rid of the @foo?
> $ ls | perl -e '@foo=<>; chomp @foo ; print join(" ", @foo)'
hi!
ls | perl -pe 's/\n\ /'
perldoc perlrun:
-p causes Perl to assume the following loop around your program,
whic
hi,
you probably want to use s/// instead of tr///.
# perl -wle '$_=""; s//(\\d\\d\\d\\d)/; print'
(\d\d\d\d)
have a look at perldoc perlop to see what tr or y really does:
tr/SEARCHLIST/REPLACEMENTLIST/cds
y/SEARCHLIST/REPLACEMENTLIST/cds
Transliterates al
tat do?
sorry john,
what do you mean by that? :(
I took the code:
#!/bin/perl
$interfaces="Output - working interface";
$chkstat="cat tmp";
$touchcmd="touch test";
if (system($touchcmd) && system($chkstat)) {
from the first e-mail
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hi
> Perhaps $touchcmd and $chkstat could be done in perl instead of running
> them in an external process? What exactly do $touchcmd and $chkstat do?
$chkstat="cat tmp";
The source looks to me that you only want to see if the file is created or not?
you can simply call open(); to check this f
ahh I am sorry! all my fault!
I didn't see that line and I started searching for the meaning of WHENCE after
the Constants are explained.
oups! Regards.
Martin
On Tue, 11 Dec 2007 14:40:24 -0500
"Chas. Owens" <[EMAIL PROTECTED]> wrote:
> On Dec 11, 2007 2:32
On Tue, 11 Dec 2007 14:28:01 -0500
"Chas. Owens" <[EMAIL PROTECTED]> wrote:
> The seek function has three ways of measuring what the second argument means:
> 0: move relative the beginning of the file
> 1: move relative to the current position in the file
> 2: move relative to the end of the file
i hope i can clarify what whence means:
snip
For WHENCE you may use the constants "SEEK_SET", "SEEK_CUR", and
"SEEK_END" (start of the file, current position, end of the file)
from the Fcntl module.
snip
whence descripes from where you start counting bytes:
if you use "SE
Hi,
> > I'm thinking on incorporating a timestamp sorting mechanism without
> > slurping.
>
> You wouldn't slurp anything. You would just assign the _names_ of the
> files to an array. Why would that be so bad?
>
If you have that much files that you do not want to put all names in an
array you
Hi Andrew,
I would suggest http://search.cpan.org/~tjenness/File-Temp-0.19/Temp.pm
HTH Martin
On Sat, 24 Nov 2007 08:44:18 -0800
AndrewMcHorney <[EMAIL PROTECTED]> wrote:
> Hello
>
> I am looking for a perl function or functions that will give me the
> date and time. I am going to use the r
anders accedently only worte a usefull mail to me:
anders <[EMAIL PROTECTED]> wrote
Hi!
Tanks for pointing out the error
I have solve it by adding a extra resource (activestate was not up-to-
date)
In ppm manager a added
http://theoryx5.uwinnipeg.ca/ppms/package.xml
And select show-all package
a
Hi,
I am trying the same thing, too.
this describes why there is no pp.
http://par.perl.org/wiki/FAQ#Why_doesn.27t_PAR_include_pp_any_more.3F
if you have a solution please show it to us :)
Regards, Martin
On 9:03:00 16/11/2007 anders <[EMAIL PROTECTED]> wrote:
> I have installed PP (PAR-Packa
Hi
you can test if something is defined with
if( defined( $var ) )
( in addition: for hashs there is also exists() )
HTH Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi,
AFAIK = as far as i know
HTH = hope that helps
HTH! ;)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi,
> I don't get that either !!!
>
> #!/bin/perl
> ### junk.pl ###
> use strict;
> use warnings;
>
> sayhello();
>
>
> sub sayhello {
>
> print "hello\n";
>
> }
thats because you're not using perls prototyping feature at all.
if you define your sub that way:
sub sayhallo() {
p
On Thu, 30 Aug 2007 15:39:14 +0100
Andrew Curry <[EMAIL PROTECTED]> wrote:
> That's rubbish,
but you get a warning like:
main::a() called too early to check prototype at -e line 1.
Use Prototypes at the beginning of your file if you want to write the subs at
the end.
HTH,
Martin
--
To unsub
Hi,
be nice to yourself and allways "use strict;"
and don't call subs with &, unless you know why you need &.
hopefully you can avoid some problems when you're writing perl code.
#!/usr/bin/perl
use strict;
marine();
HTH,
Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For add
Hi,
I dont use perl on windows, so if there are any special things about
File::Find your Filesystem I can't help you. Please show us the code
you're using to find the files you're looking for. Maybe we have some
hints for you.
HTH, Martin
On Tue, 28 Aug 2007 00:28:40 +0530
Somu <[EMAIL PROTECTE
Hi,
if you open your outputfile like
open(FH, ">>", $file)
you will append all the stuff to the file. Probably you want to
replace your file if you run your script again.
open(FH, ">", $file)
HTH, Martin
On Mon, 27 Aug 2007 22:53:16 +0530
"Mihir Kamdar" <[EMAIL PROTECTED]> wrote:
> Hi Chas,
nitesh kumar schrieb:
> Hi All,
> Can anybody suggest me how can I implement my own Data::Dumper(a function
> which work similar to perl Dumper).
>
> Thanks and Regards
> Nitesh
>
I think "ref" is your friend.
perldoc -f ref
HTH, Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additio
into the 14th field.
my $tmp = $csv->{Duration} / 60 * $csv->{Rate/sec};
$csv->{what_ever_the_name_of_your_14th_field_is} = $tmp;
On 12:17:26 27/08/2007 "Mihir Kamdar" <[EMAIL PROTECTED]> wrote:
>
>
>
> On 8/27/07, Martin Barth wrote:Hi,
>
> do you un
Hi,
do you understand my pseudo code, i think it should work for your hash?
Regards
Martin
> thanks,
>
> But i have a list of 65 countries, and I only want to implement for
> them. Also, as you said, definitely for some, prefix length is only 1
> digit, while for others, it is 2 or 3 digits. So,
sorry, I forgot to send my mail to the list:
Jeff Pang schrieb:
> > then use regex or other ways (I prefer substr) to get the prefix.
> > my $prefix = substr($string,1,3);
I think the problem is that some countrycodes are only 2 digits some are 3
( or more ? )
So you dont know how long your pre
On Fri, 17 Aug 2007 07:48:33 -0700
[EMAIL PROTECTED] (Randal L. Schwartz) wrote:
> Why not just:
>
> my @list;
> find sub { push @list, $File::Find::name }, "/var/SAMPLES";
HTH
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org
Hi there,
http://search.cpan.org/~sburke/Sort-Naturally-1.02/lib/Sort/Naturally.pm
HTH, martin.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
there is a difference between the function exit:
perldoc -f exit
and a sub you have defined by your own. even if you re-use a name of a
build-in. thats why you called exit via &exit; and not exit; or exit();
#!/usr/bin/perl -w
sub exit(){
print "sub exit called\n";
}
&exit;
&exit();
if ($
On Tue, 07 Aug 2007 11:23:05 +0300
Amichai Teumim <[EMAIL PROTECTED]> wrote:
>
> Line 11 n obj13-lib.pl is:
>
> (last index). Double check
>
> I don't know what could be wrong with this syntax, as I have never used
> these commands before. I thought it migh need a curly, but I get the
> same er
> Because he wants the final string to be "Jokerack", why else?
> (Possibly a rack for storing jokes ;)
*gg*
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I still don't understand why you have both lines in it!?
>s/J/Jack/;
>s/J/Joker/;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Thu, 12 Jul 2007 16:06:27 +0530
"Pushkar Pande" <[EMAIL PROTECTED]> wrote:
> How do we handle exceptions in perl?
there is a Error.pm in CPAN, which allows you to write code like that
try {
something();
} catch Error with {
code();
}otherwise{
foobar();
};
--
To
On Tue, 10 Jul 2007 11:32:54 -0700 (PDT)
Vincent Li <[EMAIL PROTECTED]> wrote:
>
> I am trying to experiment a simple perl math caculation script I wrote:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> my %operator = (
> minus => '-',
> add => '+',
> multiply => '*',
>
> for my ($index = 0; $index <= 10; $index++) {
>
> print ("$hour:$min:$sec\n");
>
> }
for my $index (0..10){
print ("$hour:$min:$sec\n");
}
hth
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
HTH,
% perl test.pl
4 Diamond 9 Club 3 Spade Ace Spade 8 Diamond
% cat test.pl
#!/usr/bin/perl
use strict;
use warnings;
my @startingdeck = ("A H","2 H","3 H","4 H","5 H","6 H","7 H","8 H",
"9 H","10 H","J H","Q H","K H",
"A D","2 D","3 D","4 D","5 D","6
.. 4]\n";
}
Why is it printing all this mess? I just want 5 top cards.
On 7/9/07, Martin Barth <[EMAIL PROTECTED]> wrote:
Amichai Teumim schrieb:
> Hi
>
> In my deck of cards I want to replace the letter of the card with the
name(
> e.g. A = Ace).
>
> So I tried
it is varl <- L and var1 <- 1, isn't it?
looks like a typo.
HTH
On Sun, 8 Jul 2007 20:38:43 +0200
xavier mas <[EMAIL PROTECTED]> wrote:
> > Name "main::varl" used only once: possible typo at sample.pl line 3.
> > Name "main::var1" used only once: possible typo at sample.pl line 2.
--
To unsubs
Hi
> if (($DeviceType eq "Switch") || ($DeviceType eq "Router") ||
> ($DeviceType eq "Hub") || ($DeviceType eq "Access point"))
>
>
> what i would like to do is check each device type with where the first
> letter is uppercase or lowercase
this should help:
if( $DeviceType =~ m/^([Ss]witch|[Rr
Hi,
it was hard to see the blue stuff.. :)
On Wed, 4 Jul 2007 16:14:47 +0300
"Amichai Teumim" <[EMAIL PROTECTED]> wrote:
> #!/usr/bin/perl
>
> $startdir = "/lib";
>
> $level = 0;
>
> list_dirs($startdir,$level);
calls &list_dir with $startdir and $level.
>
> sub list_dirs(){
> my $dir
Hi
maybe this wikipedia article can show you different sorting algorithems:
http://en.wikipedia.org/wiki/Sorting_algorithm#Summaries_of_popular_sorting_algorithms
there are examples in pseudocode.
HTH, Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
ohh I forgot something - oops
my $what_i_am_looking_for = "34567";
my $index = 0;
# LOOP THROUGH IT
foreach $value (sort {$coins{$a} cmp $coins{$b} } keys %coins)
{
$index++;
next unless $value == $what_i_am_looking_for;
print "<$value---$index> $coins{$value}>\n";
}
--
On Mon, 02 Jul 2007 06:20:26 -0700
[EMAIL PROTECTED] wrote:
lets say you're looking for "34567" so
my $what_i_am_looking_for = "34567";
# LOOP THROUGH IT
foreach $value (sort {$coins{$a} cmp $coins{$b} } keys %coins)
{
next unless $value == $what_i_am_looking_for;
print "<$value--->
I just googled a bit:
http://www.hiteksoftware.com/knowledge/articles/049.htm
it seems that windows has more exit codes than linux.
On Fri, 29 Jun 2007 13:15:18 +0200
"Tatiana Lloret Iglesias" <[EMAIL PROTECTED]> wrote:
> And why i windows I get exit value 777?
>
>
exit codes are stored in 1 byte. so you can only exit with
2^8 == 256 different values.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi Amichai,
first of all never write own code without these two lines:
use strict;
use warnings;
this should allways help a lot. Remember the e-mail from Chas Owens
regarding the "shuffling cards".
making comments in perl goes this way:
# hello, i am a comment.
you made C-style comments: //,
f the same each time.
>
> Any ideas?
>
> On 6/28/07, Martin Barth <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > If you don't use rand() you will allways get the same result after
> > shuffeling. Is that OK for you?
> > ( you're cheati
Hi,
If you don't use rand() you will allways get the same result after
shuffeling. Is that OK for you?
( you're cheating in card games, right? *eg* )
On Thu, 28 Jun 2007 12:37:29 +0300
"Amichai Teumim" <[EMAIL PROTECTED]> wrote:
> Thanks for all the answers. I know there are other better ways of
Thank you
I learnt a lot!
Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi,
> Ahh, very good. Thanks Rob (and Martin from earlier). I think I
> understand now. It calls the wanted sub routine, populates the @files
> array for each iteration. Then when that completes the contents of the
> array @files are printed. . .?
>
> Matt
>
you're right, Matt.
the name
Hi Matt,
> I did that, and then at the bottom of the script I tried looping through
> just to verify that @files was populated - no dice.
> (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &&
> /^DATA.*\.zip\z/s && push @files, name;
> What have I done wrong?
push @files, $name;
Hi,
change following line:
> (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &&
> /^DATA.*\.zip\z/s && print("$name\n");
to
> (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &&
> /^DATA.*\.zip\z/s && push @files, $name;
at the end you have all files in the @files ar
Hi jay,
> You haven't told us what Perl thinks the encoding of the first file
> is.
how can I do that?
> file is a system command that makes use of number of different
> approaches to determine file type including, on some systems, I think
> it even makes use of metadata. Actually examinin
> Probably. It's worth a bug report, at least.
I sent it.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi there,
have a look at:
% cat datei
eine test datei
die "u "a "o
% file datei
datei: ASCII text
% cp datei datei.bk
% perl -wpi -e 'use encoding "utf8"; s/"a/ä/' datei
% file datei
datei: ISO-8859 text
% perl -wp -e 'use encoding "utf8"; s/"a/ä/' datei.bk > datei.neu
% file datei.neu
datei.neu:
Hi,
you ment system() wen you said exec()!
perldoc -f system
perldoc -f exec
for short:
exec() replaces the perl process.
system() invokes your myslqdump process and waits till it is finished.
HTH Martin
On Fri, 15 Jun 2007 15:17:03 -
[EMAIL PROTECTED] wrote:
> Howdy,
>
> Please be gent
oh! you're right!
i'm sorry.
On Fri, 15 Jun 2007 16:51:48 +0800
Jeff Pang <[EMAIL PROTECTED]> wrote:
> Martin Barth 写道:
> > Well the code looks ok.
> >
> > I just wrote some simple test code to do the same thing like you, but
> > it worked as exepc
I don't understand what I'm not doing
> right as I've got the %EXPORT_TAGS hash set up, I've got the @EXPORTS array
> set
> up. I've got this in my opening block:
> use lib '/usr/local/bin/lib/';
> use dates_emails;
>
> Any thoughts?
>
Hi
as far as I know hash keys must be strings.
So there simply can't be a undef() as a hashkey.
to prove what I said:
% perl -MData::Dumper -le '$hash{undef()} = "foo"; $hash{""} = "bar"; print
Dumper \%hash'
$VAR1 = {
'' => 'bar'
};
HTH Martin
On Thu, 14 Jun 2007 14:03:10
Hi,
There is a %SIG hash with several signal handlers in it. you can
overwrite the signal handler for C-c and write your own stuff there.
usually you should just set a variable to true. eg. $abort = 1; your
programm should poll the var. (for example in the main loop, if there's
something like tha
On Thu, 14 Jun 2007 11:04:51 +0100 (WEST)
Jorge Almeida <[EMAIL PROTECTED]> wrote:
> I'm missing something about Perl's regexp:
>
>1 #!/usr/bin/perl -w
>2 use strict;
>3 my $s=;
>4 $s=~s/\D*//;
>5 $s=~s/\D*//;
>6 print "$s\n";
>
> When input is 'a123b', I get '123b', but
Hi,
try:
use lib "/usr/local/bin/lib/";
use dates_email;
HTH Martin
On Thu, 14 Jun 2007 01:50:57 -0400
Mathew Snyder <[EMAIL PROTECTED]> wrote:
> To take this further I've changed the code. It now looks like this:
>
> package dates_emails;
> require Exporter;
> use strict;
>
> our @ISA
i didnt understand you right, i fear, but if your server is a windows, are you
shure that you can execute ls there?
On Wed, 13 Jun 2007 12:30:00 -0500
"Lakshmi Sailaja" <[EMAIL PROTECTED]> wrote:
> You are right that I am trying to connect to a Windows m/c from a Solaris
> server.
>
> But when
On Wed, 13 Jun 2007 15:20:50 +0530
"Umesh T G" <[EMAIL PROTECTED]> wrote:
> Hola all,
>
> I have 2 perl scripts which has to run in parallel.
>
> I have run.pl which inturn has to call
> 1. pl and 2. pl;
> I am not sure how I can do it using the Perl Threads.
>
> Can someone throw some light h
On Tue, 12 Jun 2007 11:56:12 -0500
"Lakshmi Sailaja" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there a way to use a variable in the Prompt parameter like the below
> line?
>
> my $telnet = Net::Telnet->new([HOST => "$server",]
> [PROMPT => /$prompt/,]);
>
> Thanks & Regards,
> La
On Fri, 08 Jun 2007 19:52:59 -
ash <[EMAIL PROTECTED]> wrote:
> Hello there!
>
> I need to remove decimal points from numbers. For eg 1.23 or 1.77
> would be just 1. Any suggestion is appreciated. Thank you.
>
>
my $number = 1.77;
print int $number;
--
To unsubscribe, e-mail: [EMAIL PROT
Hi,
> I know that using 'Here Documents', we can output multiple lines. But is it
> possible to run a couple of commands?
>
> $s = qx [sqlplus user/[EMAIL PROTECTED] < select 2 from DUAL;
> exit
> ENDOFSQL];
what do you think about that:
open(DBI, "| sqlplus user/[EMAIL PROTECTED]");
then print
try to change the shebang to #!/bin/sh
first of all: you shouldn't use the backticks `` if you dont want to
have the output of the program.
2nd: don't use touch, chmod, etc... there are many ways to do it much
faster in perl. everytime you do somethink like that you invoke a
fork() and start a ne
Hi,
in that case you need to start your deamon by configuring /etc/inittab,
don't you?
6:23:respawn:/sbin/getty 38400 tty6
HTH
On Fri, 8 Jun 2007 03:16:23 -0400
"Chas Owens" <[EMAIL PROTECTED]> wrote:
> On 6/8/07, Juan Pablo Feria Gomez <[EMAIL PROTECTED]> wrote:
> > Hi all, I need to star
Hi,
seems that there is one msg of you missing...
if you want to know something about good style: perldoc perlstyle.
there you can find some stuff about (package) globals.
if you have a big application maybe you want a data abstraction package
which should containt the database handle?
--
To u
Hi,
afer trying a lot of stuff i figured out that following code line works:
my ($login,$pass,$uid,$gid) = (getpwnam($user),rand);
without rand it's still the old user... can anyone explain why perl seems to
cache this? (even without eval)
Tom Phoenix schrieb:
> On 5/18/07, Mart
On Mon, 21 May 2007 08:41:13 +0200
Andreas Moroder <[EMAIL PROTECTED]> wrote:
> Hello,
>
> in our application I have to convert all german Umlaute in a string to a
> two char combination ä to ae, Ö to OE and so on.
>
> Can anyone please tell me how to do this ?
>
> Thanks
> Andreas
>
>
for e
Hello Tom,
> On 5/18/07, Martin Barth <[EMAIL PROTECTED]> wrote:
>
> > print "** " . eval("getpwnam('christian')") ."\n"; sleep 10;
>
> Why are you (mis-)using the evil eval?
>
> > if I do a perl -wle
I am changing the authetication typ, from local to remote ldap on a pc.
I want to get the new userid of a user, therefore i have following code.
system ("/etc/init.d/nscd stop");
system ("/etc/init.d/winbind restart");
print "**" . getpwnam("christian") ."\n";
## code that changes from l
perldoc perlrun *g*
-p causes Perl to assume the following loop around your
program, which makes it iterate over filename arguments somewhat like
sed:
LINE:
while (<>) {
... # your program goes here
} continue
it iterate over each character?
>
> Martin Barth wrote:
> > On Fri, 11 May 2007 17:50:41 -0400
> > Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> >
> >> echo 500 | perl -ple 's|(\d)|length(9 x $1)|eg;'
> >
> > no you're wrong:
&g
On Fri, 11 May 2007 17:50:41 -0400
Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> echo 500 | perl -ple 's|(\d)|length(9 x $1)|eg;'
no you're wrong:
s///g <- matches 5 first. length(9x5) == 5, thats true
but now next digit! 0 -> length ( 9 x 0 ) == length("") == 0
same again
--
To unsubsc
Hi Jeff,
that would be a solution. I wanted to be lazy and don't use the complete path.
If there is no other solution I just will make a A/Type.pm
thanks Martin
Jeff Pang schrieb:
> 2007/5/8, Martin Barth <[EMAIL PROTECTED]>:
>
>>
>> but now I dont know to import
Hi all,
I have a Package A with serveral subs in it and now I want to make a package
A::Types with some constants in it.
I have A.pm with:
..some code and subs ..
package A::Type;
use constant { CONST1 => "foo", CONST2 => "bar"};
package A;
..some more code and subs..
now I wanted to use
On Fri, 4 May 2007 16:17:35 +0200
[EMAIL PROTECTED] wrote:
> On Fri, May 04, 2007 at 07:36:57PM +0800, Jeff Pang wrote:
>
> > Since you've got the sorted keys,can't you access the full hash?
>
> Well, it works this way -- thanks!
>
> But I wonder why it's not possible to sort a hash in a more i
Hi,
if you're reading a config file to get the string maybe Config::General is
handy.
HTH
Martin
On Sun, 29 Apr 2007 14:27:52 +0100
Goksie <[EMAIL PROTECTED]> wrote:
> hello,
>
> Can someone help me correct this code.
>
> if i print, it only print the first line.
>
> Goksie
>
> #!/usr/bin
> Hello,
>
> > I want to determine the character encoding of some strings I have.
> > Something similar to the "file" tool,
>
> http://search.cpan.org/~knok/File-MMagic-1.27/
>
> John
Hi,
I am sorry John, i think that won't help me :-(
File::MMagic works like File::Type ( which says its a impr
Hi,
is your version allways number dot number dot number? or can it be..
e.g. 1.2.1a or 1.6
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi
On Fri, 27 Apr 2007 11:33:47 +0200
Andreas Moroder <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have to calculate a hash of username and password in perl.
> The calculation should be done this way:
>
first the easy stuff, I think you already know that answers to that:
> 1. Concatenate the use
Hi,
I want to determine the character encoding of some strings I have.
Something similar to the "file" tool, which gives me this information:
cp1252.text: Non-ISO extended-ASCII text
iso-8859-1.text: ISO-8859 text, with no line terminators
macintosh.text: Non-ISO extended-ASCII text
utf16.te
it's: 0 == 0
Hoffmann schrieb:
> Dr.Ruud wrote:
>> Hoffmann schreef:
>>
>>> Could some one explain how, in the example below, $name and $goodguy
>>> are equal numerically?
>>>
>>> $name = 'Mar';
>>>
>>> $goodguy = 'Tony';
>>>
>>> if ($name == $goodguy) {
>>> print "Hello, Sir.\n";
>>
Anish Kumar K schrieb:
> Hi
> In java we have instance operator to tell the type of Object.
>
> Similarly in perl say I am passing a reference object to a function,
>
> Is it possible to detect in the function whether the object is HASH or
> ARRAY...
>
> Thanks
> Anish
>
Hi,
try this: ref($va
99 matches
Mail list logo