getCellValue

2008-09-05 Thread Xavier Mas
$valor_alfanumeric); $doc->save('my_other_file.ods'); } -- Xavier Mas __ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo

Re: return sorted hashes from subroutines

2008-08-29 Thread Xavier Mas
; my @stend =split/\t/,$item; > > $st{$stend[0]}= $stend[1]; > >} > > @{$hash{$k}}= sort {$a <=> $b} keys%st; > >foreach my $f(keys%hash){ > >foreach my $l(@{$hash{$f}}) { > >print "$f,$l,$st{$l} ok\n";# it prints OK > >

Re: taking a total line from a filehandel

2008-08-27 Thread Xavier Mas
+/,$_); >print $line."\n"; > } > close($FH); > > But this code prints only the first words of every line > Where I am making the mistake??? > > Thanks&Regards in advance > Anirban Adhikary. Just use that: s# +##g; -- Xavier Mas

Re: encrypt a text file

2008-08-27 Thread Xavier Mas
ability to decrypt the encryped one to the > original text. > > Any suggestion is welcome. thanks. Look in CPAN for a module. -- Xavier Mas __ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y

Re: "use constant" as hash key

2008-08-25 Thread Xavier Mas
s" section of the perlref.pod man page > > for some hints: > > perldoc perlref > > > > John > -- > Perl isn't a toolbox, but a small machine shop where you > can special-order certain sorts of tools at low cost and > in short order.

Re: What wrong with this code

2008-08-25 Thread Xavier Mas
ing printed but Inside foreach loop it is not showing anything. > > Can anybody Please suggest me where I am making the mistake? > > Thanks & Regards in Advance > Anirban Adhikary. Did you try to use uniq comand from the Unix bash? I think code would be much easy (use exe or sy

Re: Using match variable

2008-08-19 Thread Xavier Mas
El Tuesday 19 August 2008 21:15:27 Dr.Ruud va escriure: > Xavier Mas schreef: > > Dr.Ruud: > >> Xavier Mas: > >>> m#(pattern)#; > >>> $variable= $1.; > >> > >> That can be written as: > >> ($variable) = /(pattern)/; > > &

Re: Unmatched [ in regex; marked by <--- HERE .........

2008-08-19 Thread Xavier Mas
racket that needs to > be matched up. > > The Perl exe is that latest copy from ActiveState. > > Any thoughts/work arounds would be all kinds of appreciated. Or try to escape the ] character, although it's between '. -- Xavier Mas ___

Re: Using match variable

2008-08-19 Thread Xavier Mas
El Tuesday 19 August 2008 10:32:58 Dr.Ruud va escriure: > Xavier Mas schreef: > > m#(pattern)#; > > $variable= $1.; > > That can be written as: > > ($variable) = /(pattern)/; > > -- > Affijn, Ruud > > "Gewoon is een tijger." Thank you for po

Re: Using match variable

2008-08-19 Thread Xavier Mas
nt match in first place? You can store a matched pattern into a varaible using automatic memories as follows : m#(pattern)#; $variable= $1.; -- Xavier Mas __ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 cént

Re: cpan module installation on Mac OS Leopard

2008-08-19 Thread Xavier Mas
installed called pm, ppm or something similar. You can copy the .pm files of the module you want to install to that directory too. -- Xavier Mas __ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo p

Re: search and replace command with output

2008-08-18 Thread Xavier Mas
El Thursday 14 August 2008 17:30:43 [EMAIL PROTECTED] va escriure: > Xavier, > > Thanks for the tip but can you help me by pasting the code too? It > might take 2 mins for you but I will have to fiddle with it longer :( > > Regards. > > On Aug 14, 6:02 am, [EMAIL PROTE

Re: Not able to open a file.

2008-08-14 Thread Xavier Mas
> > in short order.                            -- Larry Wall > > It did not make any difference. > it says there is no such file in the $Bin path.. > Ofcourse there is no such file in that path. i want to look in the > path iam executing the code. > > Any one can hep me!

Re: substitution from line in context to matched line

2008-08-14 Thread Xavier Mas
he pattern > BEGIN { > $ln or warn "Enter line: $0 -ln\n" and exit 255 > } > # sample nearby -1 lines that need substitution @lines = > (7303,7309,7315,7321,7327,7333,7339,7345,7351,7357,7363,7369,7375,7381,7387 >,7393,7399,7405,7411,7417,7423,7429,7435,7441,7447,7453,7459,7465,7471,7477, >7

Re: search and replace command with output

2008-08-14 Thread Xavier Mas
ement with binding operator (=~) to find out which lines are going to be replaced. -- Xavier Mas __ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com -- To unsu

Re: Global symbol "$var1" requires explicit

2007-07-08 Thread xavier mas
> Thanks, > > > Rajeev Kilaru > > > > -- > > Ken Foskey > > FOSS developer > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > http://learn.perl.org/ This isn't an error, but is a warning saying $var1 is used only once so may be there's an error on the variable name. But if you're sure there's no mistake just ignore the warning. Cheers, -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: parsing html data

2007-05-23 Thread xavier mas
g/~bricas/WWW-Wikipedia-1.92/lib/WWW/Wikipedia.pm). > > You can manu more dictionaries in the cpan. > > Yaron Kahanovitch > > > - Original Message - > From: "xavier mas" <[EMAIL PROTECTED]> > To: beginners@perl.org > Sent: 22:14:07 (GMT+0200) Afr

Re: parsing html data

2007-05-22 Thread xavier mas
El Martes 22 Mayo 2007 22:00, David Moreno Garza escribió: > xavier mas wrote: > > dear all, > > > > I'm trying to make a consult to a online dictionary from an html > > document, the result of the consult has to be output in a text field of > > the same ht

parsing html data

2007-05-22 Thread xavier mas
tions? -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: matching labels

2007-05-17 Thread xavier mas
El Jueves 17 Mayo 2007 22:11, Dr.Ruud escribió: > xavier mas schreef: > > I have a little problem don't have how to solve regarding matching. I > > am working with xml files that contain labels marking the text inside > > them. > > Use an XML-parser. > http://se

matching labels

2007-05-17 Thread xavier mas
gt;CONTENT3 CONTENT4 i don't know how to iterate over the line matching and mixing up their contents if dont' use index and substring string functions inside a while loop, but this is much complicated. )'m sure Perl has another simpler way to do ti, but can't figure out how. An

Re: regular expression

2007-05-05 Thread xavier mas
vitch > > - Original Message - > From: "xavier mas" <[EMAIL PROTECTED]> > To: beginners@perl.org > Sent: 09:42:29 (GMT+0200) Asia/Jerusalem שבת 5 מאי 2007 > Subject: Re: regular expression > > El Sábado 05 Mayo 2007 01:16, Ken Foskey escribió: > &

Re: regular expression

2007-05-04 Thread xavier mas
El Sábado 05 Mayo 2007 01:16, Ken Foskey escribió: > On Sat, 2007-05-05 at 01:01 +0200, xavier mas wrote: > > HI list!, > > > > I have a file with labels and a small text inside. When this text is > > different of a pattern text (n, for instance), this label must b

regular expression

2007-05-04 Thread xavier mas
w can I do this? -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

encoding string

2007-04-13 Thread xavier mas
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/

Re: html source to text file

2007-04-05 Thread xavier mas
El Jueves 05 Abril 2007 20:21, Chas Owens escribió: > On 4/5/07, xavier mas <[EMAIL PROTECTED]> wrote: > > HI all, > > > > I am trying to get from a Perl program the source code of a web page and > > after to push it into a text file. I'm not able to find to

html source to text file

2007-04-05 Thread xavier mas
HI all, I am trying to get from a Perl program the source code of a web page and after to push it into a text file. I'm not able to find to way to do that or even don't know if that is possible somehow, someway. Any suggestions? Many thanks to all for your help. -- Xavier M

Re: create gui

2007-03-31 Thread xavier mas
El Sábado 31 Marzo 2007 14:10, zentara escribió: > On Fri, 30 Mar 2007 20:04:26 +0200, [EMAIL PROTECTED] (xavier mas) > > wrote: > >Thank you for your answer, zentara. Which module I need to download from > >cpan.org to use Tk in Perl? > > > >Greetings, > >

Re: create gui

2007-03-30 Thread xavier mas
El Viernes 30 Marzo 2007 14:33, zentara escribió: > On Thu, 29 Mar 2007 20:35:21 +0200, [EMAIL PROTECTED] (xavier mas) > > wrote: > >Hi list, > > > >I want to create an interface with Per,l like a form for a database. > > Searching in cpan.org I found many Qtk a

Re: create gui

2007-03-30 Thread xavier mas
El Viernes 30 Marzo 2007 17:24, Rob Dixon escribió: > xavier mas wrote: > > Hi list, > > > > I want to create an interface with Per,l like a form for a database. > > Searching in cpan.org I found many Qtk and Tk modules, but I really don't > > know what I need

create gui

2007-03-29 Thread xavier mas
tings, -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: [SPAM DETECT] Re: comparing hashes

2007-01-14 Thread xavier mas
t;I1D0\n"; print $projecte_out;} if ($img_flag eq "1" && $dict_flag eq "1") { $projecte_out= "I1D1\n"; print $projecte_out;} if ($img_flag eq "-1" && $dict_flag eq "-1") { $projecte_out= "I0D0\n"; print $projecte_out;} if ($img_flag eq "-1" && $dict_flag eq "1") { $projecte_out= "I0D1\n"; print $projecte_out;} } and this are the results: I0D0 I0D0 I0D0 Cheers, -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: comparing hashes

2007-01-14 Thread xavier mas
e handlers pointing to the files). The output of that small program is also just a printing to an output file. What else do you need? -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: comparing hashes

2007-01-14 Thread xavier mas
A Diumenge 14 Gener 2007 06:39, Bill Jones va escriure: > On 1/13/07, xavier mas <[EMAIL PROTECTED]> wrote: > > Yes, this is the code I use, but still doesn't work to me and I can't > > find the cause. > > Have you looked the results using Data::Dumper? M

Re: comparing hashes

2007-01-13 Thread xavier mas
A Dissabte 13 Gener 2007 20:38, John W. Krahn va escriure: > xavier mas wrote: > > Here's an example: > > in (file, array and hash) contains: "woman, lion, ball" > > img (file, array and hash) contains: "ball, dog, cat, lion". > > dict (fil

Re: comparing hashes

2007-01-13 Thread xavier mas
A Dissabte 13 Gener 2007 18:53, Xavier Noria va escriure: > On Jan 13, 2007, at 6:29 PM, xavier mas wrote: > > hello list, > > > > I am trying to find if an element in one primary file (transformed > > to array) > > is included in two other different secondary

comparing hashes

2007-01-13 Thread xavier mas
s -the element isn't always found into the secondary hashes. Any suggestion of why it doesn't and how to do it? Your help is very much appreciated. -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

.pm

2007-01-08 Thread xavier mas
Hi, list! I want to install the Copy::File module and utf-8 pragma but I can download only the .pm file. How do I have to install it? Or Where do I have to copy it if that is the case -I guess this is the unzip and file to install? Thanks a lot for your help. -- Xavier Mas -- To

Re: [SPAM DETECT] split and grouping in regexp

2006-10-31 Thread xavier mas
A Dilluns 30 Octubre 2006 02:34, xavier mas va escriure: > A Dimarts 31 Octubre 2006 02:22, Daniel Kasak va escriure: > > my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd; > > split function can't accept an expression on its syntax, only a character > as separator f

Re: [SPAM DETECT] split and grouping in regexp

2006-10-30 Thread xavier mas
A Dimarts 31 Octubre 2006 02:22, Daniel Kasak va escriure: > my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd; split function can't accept an expression on its syntax, only a character as separator field. -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: MP3::Tag and Reading values from a Hash

2006-10-22 Thread xavier mas
t; > However it seems to return two strings 'HASH(0x8356294)' and 'Attached > picture' when I read it to an array or a set of comma separated scalars. > > I feel that the value HASH(0x8356294) is somehow a clue, but I can't > figure out how to access what I w

Re: calling system

2006-10-21 Thread xavier mas
A Dissabte 21 Octubre 2006 11:18, Xavier Noria va escriure: > On Oct 21, 2006, at 9:52 AM, xavier mas wrote: > > Dear all, > > Hi Xavier! > > > I'm trying to rename a bunch of files to the estination names > > included in a > > prepared files calling the

Re: To shebang or not to, and script feedback.

2006-10-21 Thread xavier mas
gt; ------------ Shebang shows Perl the path to bin program as it can be execute. Is needed if you run Linux, but not in Windows. Actually, Linux scripts are always headed on tis first line by one of those to say where is the wanted executable. Instead, Windows "knows" always where it its, so this line is not needed. Hope this helps. -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

calling system

2006-10-21 Thread xavier mas
les I have to rename. ... cont = 0; while () { cont++ $file_out = $_; $file_in = $cont; system "mv $file_in $file_out";} ... -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: reading a file

2006-10-19 Thread xavier mas
y $line =) { > print OUT "QQQ $line QQQ\n"; > } > > > Ryan Im my @lines you are giving all the file in one shot. read de the file line by line using a while loop inserting all last chunk of code into it. -- Xavier Mas -

Re: Date and Time Functions

2006-09-21 Thread Xavier Mas i Ramón
> Andrew sytem "date" spits out an string of 30 characters long to standart output with current date and time followed by a newline. -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Access elements of a array of hases

2006-09-15 Thread Xavier Mas i Ramón
gt;); > > > sub my_calculation { > my $array_ref=shift; > > my $the_one_value=$array_ref->[ -1 ]->{ B }; > > for my $hash ( @$array_ref ) { > print $the_one_value - $hash->{ B }, "\n"; > } > } > > my_calculation ([EMAIL PROTECTED]); > > __END__ > > maybe you want to generalize the sub a bit: > > # ... > sub my_calculation { > my ($array_ref, $keyname)[EMAIL PROTECTED]; > > my $the_one_value=$array_ref->[ -1 ]->{ $keyname }; > > for my $hash ( @$array_ref ) { > print $the_one_value - $hash->{ $keyname }, "\n"; > } > } > # ... > my_calculation ([EMAIL PROTECTED], 'B'); > > __END__ > > greets > > Dani To access an elements of an array of hashes, do like: print $array[4]{A},"\n";#is value 17. -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

german characters in Perl

2006-09-14 Thread Xavier Mas i Ramón
or way to get around handling german characters? -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: hash access

2006-09-14 Thread Xavier Mas i Ramón
A Dijous 14 Setembre 2006 11:38, Mumia W. va escriure: > On 09/14/2006 01:18 AM, Xavier Mas i Ramón wrote: > > Hi all!, > > > > I'm trying to create a sorted (ASCII) hash file but get all time a syntax > > error in line "my $abreviatures{$clau} = 1;" at &

Re: hash access

2006-09-14 Thread Xavier Mas i Ramón
A Dijous 14 Setembre 2006 08:31, John W. Krahn va escriure: > Xavier Mas i Ramón wrote: > > Hi all!, > > Hello, > > > I'm trying to create a sorted (ASCII) hash file but get all time a syntax > > error in line "my $abreviatures{$clau} = 1;" at "

hash access

2006-09-13 Thread Xavier Mas i Ramón
ook. Pls, can someone tell me where is the syntax error? ... while () { chomp; my $clau = $_; my $abreviatures{$clau} = 1; } close ABREVIATURES; ... Many thanks, -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: splitting the line correctly

2006-09-10 Thread Xavier Mas i Ramón
: @fields = split /separator/, $string; (using default split is: @fields = split;). Using 'separator' you're taking a literal as a separator. -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: process data into an array using CGI script

2006-09-03 Thread Xavier Mas i Ramón
then you put a delimiter before and after each entry ans use split function to separet those elements. Finally, assign them into an array so each element be one of your CGI data elements. The sintax of split operator is: @fields = split /separator/, $string (Ref: "Learning Perl, 4th. editi

Re: shifting 100 at a time

2006-08-20 Thread Xavier Mas i Ramón
A Diumenge 20 Agost 2006 22:49, Gerald Host va escriure: > What is the most efficient way to shift the first 100 items off an array? > > Thanks! if you mean that first element be the last one and so on, use reverse. -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: Simple-Yet Trivial Problem - Copy files from directory

2006-08-19 Thread Xavier Mas i Ramón
more information. > sh: /: is a directory > but when am doing it manualy all the comments are working fine > > Please help me with some inputs - this is not a perl error, but system error; warning says the cp instruction you wrotte in within the block isn't correct. that's wh

Re: passing an array to subroutines

2006-07-21 Thread Xavier Mas i Ramón
I'd like to say > @z = @_[0]; > and have @z refer to the entire array I passed to the subroutine, rather > than just the first element which is the case now. > > > thanks, > [EMAIL PROTECTED] Why don't you assign the full element to a $ variable and then pass thi

Need help with error from certain ASCII characters in a CSV file

2006-07-07 Thread Xavier Mas i Ramón
Did you try to replace these characters of the file by they Unicode code (that Perl coulf read)? -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>