Extract attribute from huge xml file

2007-12-10 Thread Beginner
Hi, I have a huge XML file, 1.7GB, 53080215 lines. I am trying to extract an attribute from each record (code=). I several problems one of which is the size of the file is making it painful to test my scripts and methods for parsing. I would like to extract a few hundred records (by any means)

Re: modify mirror list - CPAN

2007-12-03 Thread Beginner
On 24 Oct 2007 at 7:22, Tom Phoenix wrote: > On 10/24/07, Beginner <[EMAIL PROTECTED]> wrote: > > > I want to modify the mirror list that I selected when I did a first > > run of perl -MCPAN. > > You can modify your settings within a CPAN shell session by using

Re: seek and tell

2007-11-30 Thread Beginner
On 30 Nov 2007 at 10:35, John W.Krahn wrote: > On Friday 30 November 2007 09:07, Beginner wrote: > Hello, > [ SNIP ] > > > $| = 1; > > You never print to STDOUT so that line is superfluous. > > my $in = 0; > > > > my $sRootPath = 'e:/'

seek and tell

2007-11-30 Thread Beginner
Hi, Can someone spot and explain what I am doing wrong. I have a script that should read the contents of a CD (on Win32). I want a summary at the top of the page of what I've found. I use find to count the files and dirs and I want the total files ($in) to be a the top before I list the files.

Re: How can I assign system() call to a Variable

2007-11-14 Thread Beginner
On 13 Nov 2007 at 19:11, Marco wrote: > Hi... Hi > Can someone help me on this? Actually I can get the dara from the > system()...But it shows "0" when I print the $result...How can I > assign the system() to $result ?Thanks... > > here below is the code... > > $inact = "cat /proc/meminfo

Re: Hash slice

2007-11-12 Thread Beginner
On 9 Nov 2007 at 20:04, Jenda Krynicky wrote: > From: "Beginner" <[EMAIL PROTECTED]> > > On 9 Nov 2007 at 16:35, Jenda Krynicky wrote: > > > > > From: "Beginner" <[EMAIL PROTECTED]> > > > > #!/bin/perl > &g

Re: Hash slice

2007-11-09 Thread Beginner
On 9 Nov 2007 at 16:35, Jenda Krynicky wrote: > From: "Beginner" <[EMAIL PROTECTED]> > > #!/bin/perl > > > > use strict; > > use warnings; > > use Data::Dumper; > > > > my @keys = qw(fe fi fo thumb); > > my @valone = 1..4; >

Re: Hash slice

2007-11-09 Thread Beginner
On 9 Nov 2007 at 14:59, Rob Dixon wrote: > Beginner wrote: > > Hi all, > > > > Is it possible to make a hash slice like so > Hey Dermot Hi Rob, > It's certainly possible, but I'm not sure why you've taken a reference > to your key and value array

Hash slice

2007-11-09 Thread Beginner
Hi all, Is it possible to make a hash slice like so my %hash; @[EMAIL PROTECTED] = [EMAIL PROTECTED]; My efforts suggest not: #!/bin/perl use strict; use warnings; use Data::Dumper; my @keys = qw(fe fi fo thumb); my @vals = 1..4; my %hash; @[EMAIL PROTECTED] = [EMAIL PROTECTED]; print Dumper

Re: DBI prepare syntax

2007-11-08 Thread Beginner
On 8 Nov 2007 at 8:59, Mike wrote: > Hi, > > #Update override_exclude set th_flag="N" to indicate that thesaurus entries > #have been added to sierra2_thesaurus.xml > > use DBI; > my $dbh = DBI->connect("dbi:mysql:endeca_tracking",$user,$password); > my $sth = $dbh->prep

Re: FileHandle

2007-11-01 Thread Beginner
On 1 Nov 2007 at 19:43, Kaushal Shriyan wrote: > Thanks Rob > > Its working Fine, Now when I am using the below code to write something to > file "messages" > the below code is not writing the text "write some text " to the file > messages. > > ## > #!

Re: FileHandle

2007-11-01 Thread Beginner
On 1 Nov 2007 at 19:20, Kaushal Shriyan wrote: > Hi > > I am using FileHandle, Below is my code > > > #!/usr/bin/perl > > use warnings; > use strict; > > open(LOGFILE, "messages") > || warn "Could not open messages"; > open(DATA, ">/tmp/data") |

Re: impatient DBI query

2007-10-31 Thread Beginner
On 31 Oct 2007 at 0:00, Jeff Pang wrote: > > > -Original Message- > >From: Beginner <[EMAIL PROTECTED]> > >Sent: Oct 31, 2007 9:20 PM > >To: beginners@perl.org, beginners@perl.org > >Subject: impatient DBI query > > > >Hi, > &g

impatient DBI query

2007-10-31 Thread Beginner
Hi, I have ordered my Perl DBI book (is that a leopard?) but I am impatient and want to know how I could do a select/like statement a bit like this: SELECT foo FROM bar WHERE foo like 'baz%' the % being the wildcard operator. Any advice? Dp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Re: Quotes and apostrophes assistance

2007-10-29 Thread Beginner
On 29 Oct 2007 at 10:55, Paul Lalli wrote: > On Oct 29, 12:31 pm, [EMAIL PROTECTED] (Dr.Ruud) wrote: > > "Beginner" schreef: > > > > > I am trying to insert a lots file paths into an SQLite table and am > > > having trouble with filenames with apostrop

Re: array within array

2007-10-29 Thread Beginner
On 29 Oct 2007 at 8:42, Mike Tran wrote: > Hey all, > > > > I'm new with Perl and need help with this simple script. I'm still > playing around with the script below to get a feel for Perl. My script > below is incomplete and I'm doing an array within an array which is > incorrect. Please help

Quotes and apostrophes assistance

2007-10-29 Thread Beginner
Hi, I am trying to insert a lots file paths into an SQLite table and am having trouble with filenames with apostrophes in. Below is the snippet I have been using. I have experimented with sprintf, qq and a combination of both but can't get a quoting system that will get DBI to accept paths li

Re: error in qx

2007-10-26 Thread Beginner
On 26 Oct 2007 at 19:14, Jeff Pang wrote: > On 10/26/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > I am executing my $usr=qx("who am i"); to get the user id on unix > > machine but it is giving error. sh: who am i: not found > > > > Oops,it's `whoami` not `who am i` unle

modify mirror list - CPAN

2007-10-24 Thread Beginner
Hi, I want to modify the mirror list that I selected when I did a first run of perl -MCPAN. One of the mirror I choose has stopped being a mirror and causing the the install process to take much longer. I did perl -MCPAN -e shell but there were no options that looked relevant. Is there a way

Re: Help generating XML output

2007-10-23 Thread Beginner
On 23 Oct 2007 at 16:46, Jenda Krynicky wrote: > From: "Beginner" <[EMAIL PROTECTED]> > > On a more general point I haven't found it easy to find modules > that > > output XML or perhaps I should say, I didn't find the ones I did > look > >

Re: Help generating XML output

2007-10-23 Thread Beginner
On 23 Oct 2007 at 14:21, Jenda Krynicky wrote: > From: Rob Dixon <[EMAIL PROTECTED]> > > I am unfamiliar with XML::Generator, but have experimented with it > for > > the purposes of your question and it seems to be essentially a > translator > > that will convert a Perl fragment into an XML fragme

Re: Help generating XML output

2007-10-23 Thread Beginner
On 23 Oct 2007 at 12:12, Rob Coops wrote: > foreach my $k (keys %{$ref}) { > $xml = $gen->users( # $xml gets over written with every new > key So instead of doing that I would try $xml .= (appending) > $gen->username({ id => $ref->{$k}},$k), >

Help generating XML output

2007-10-23 Thread Beginner
Hi, I have been trying to output XML that looks like this: dermot joe ... I have tried XML::Simple and XML::Generator but keep hitting the same problem when it comes to separating the id attribute and the value from my hash reference. $VAR1 = { 'dermot' => '10',

Re: code ref within a hash?

2007-10-19 Thread Beginner
On 19 Oct 2007 at 15:29, Beginner wrote: > On 19 Oct 2007 at 9:26, Stephen Kratzer wrote: > > > On Friday 19 October 2007 07:41:40 Beginner wrote: ...snip > so I modify the hash so it looks like: > ...snip > 'name' => &edit_from_path($File

code ref within a hash?

2007-10-19 Thread Beginner
Hi, In the script below I am trying my hand at using a code ref within a hash. I want the key 'name' to contain a scalar value. It does but I am not sure how to dereference it. Here is the output from the script at the moment. /data/users/nat/finished/01.tif SCALAR(0x8db3cac) /data/users/nat/f

Re: Hash receive Array

2007-10-09 Thread Beginner
On 9 Oct 2007 at 11:09, Rodrigo Tavares wrote: Hi > Hello, > > I created a hash with some elements and keys. > The hash must receive a array. > > Can I do it ? yes. I think this will work. $hash{'myarray'} = [1, 2, 3]; or $hash{'myarray'} = [EMAIL PROTECTED]; and I am sure there are l

Re: Storing a subroutine pointer inside a variable?

2007-10-09 Thread Beginner
On 9 Oct 2007 at 9:01, Jeff Pang wrote: > 2007/10/9, yitzle <[EMAIL PROTECTED]>: > sub test { > my ($function, $description, $var, undef) = @_; > print $description . ": "; > print $function->($var) ? "Yes\n" : "No\n"; > } Can someone explain why there is a 4th, undefined variable being decl

Re: Variable scope

2007-10-02 Thread Beginner
On 2 Oct 2007 at 15:23, Rob Dixon wrote: > Hi Dermot. You're a little confused, but you're not far out! Your being kind. > > > > $| = 1; I wasn't aware this only applied to STDOUT. My log messages all appear at once, when the script has exited and I was hoping for some 'realtime' messages.

Variable scope

2007-10-02 Thread Beginner
Hi, I thought that the code snip below should work but I am not getting my text into the the file. The file is created but it's empty. Ideally I want to create the log file outside any sub routines so that $log to be available to any sub I have created and hence not scoped to any one sub routi

Re: Text::Aspell

2007-09-14 Thread Beginner
On 11 Sep 2007 at 12:38, Chas Owens wrote: > On 9/11/07, Beginner <[EMAIL PROTECTED]> wrote: > snip I think my installation might be broken some how. > Would > > you agree? > snip > > At this point, yes, there is something other than the Perl code > you/I >

Re: Text::Aspell

2007-09-11 Thread Beginner
On 11 Sep 2007 at 10:04, Chas Owens wrote: > On 9/11/07, Beginner <[EMAIL PROTECTED]> wrote: > snip > Please do not type error messages. Copy and paste them instead. > Actually the rule should be, "don't type anything but your > commentary". > > snip

Re: Text::Aspell

2007-09-11 Thread Beginner
On 11 Sep 2007 at 9:25, Chas Owens wrote: > On 9/11/07, Dermot Paikkos <[EMAIL PROTECTED]> wrote: > > On 10 Sep 2007 at 12:52, Chas Owens wrote: ..snip > Three things: > 1. You are building dict.local, but the error message says local.dict > 2. Did you try my example and did it work? > 3. You ar

Re: Help with data returned by regex match

2007-09-11 Thread Beginner
On 11 Sep 2007 at 11:36, kapil.V wrote: > Hi, > > #!/usr/bin/perl -w > my $path = shift; > my $machine = shift; > my (undef,$country, $property) = split /\//,$path; > my $xmlData = qx!./pindown. php $machine!; > my @contacts = $xmlData =~ /property name=\"$property\ " > country=\"$country\ ">.+?

Text::Aspell

2007-09-10 Thread Beginner
Hi, I am sorry if this is a bit module specific, I am hoping someone on the list has some experience of Text::Aspell and can help. I am trying to use a custom dictionary. I can use the command line aspell check --master="./dict.local" somefile and words included in my dictionary like "Aberyst

Re: Test data generation using Perl Scripting.

2007-09-07 Thread Beginner
On 7 Sep 2007 at 9:47, Chas Owens wrote: > On 9/7/07, Chas Owens <[EMAIL PROTECTED]> wrote: > snip > > #FIXME: this creates invalid dates like 2007-02-30 > > sub rand_date { > > sprintf "%04d-%02d-%02d", > > 2000 + int rand 7, > > 1 + int rand 12, > >

Re: Regex help

2007-09-04 Thread Beginner
On 3 Sep 2007 at 17:44, Rob Dixon wrote: > Beginner wrote: > > > > I am trying to come up with a regex to squash multiple commas into > > one. The line I am working on looks like this: > > > > SPEED OF LIGHT, , LIGHT SPEED,TRAVEL,TRAVELLING, , > >

RE: Regex help

2007-09-03 Thread Beginner
On 3 Sep 2007 at 16:12, Andrew Curry wrote: > $ perl -le' > $_ = q[SPEED OF LIGHT, , LIGHT SPEED,TRAVEL,TRAVELLING, , > DANGER,DANGEROUS,PHYSICAL, , CONCEPT,CONCEPTS, , , , , , , , , , ]; > > print; s/,\s*(?=,)//g; print; ' > SPEED OF LIGHT, , LIGHT SPEED,TRAVEL,TRAVELLING, , > DANGER,DANGEROU

RE: Regex help

2007-09-03 Thread Beginner
On 3 Sep 2007 at 16:15, Andrew Curry wrote: > Think > > s/(\,+\s*)+/,/g; > > Should work > > It produces > SPEED OF LIGHT,LIGHT > SPEED,TRAVEL,TRAVELLING,DANGER,DANGEROUS,PHYSICAL,CONCEPT,CONCEPTS > > If that's what you want. Exactly what I want. Thanx, Dp. -- To unsubscribe, e-mail: [E

Regex help

2007-09-03 Thread Beginner
Hi, I am trying to come up with a regex to squash multiple commas into one. The line I am working on looks like this: SPEED OF LIGHT, , LIGHT SPEED,TRAVEL,TRAVELLING, , DANGER,DANGEROUS,PHYSICAL, , CONCEPT,CONCEPTS, , , , , , , , , , There are instances of /,\s{1,},/ and /,,/ The bit tha

RE: how to remove ^M character from every line

2007-09-03 Thread Beginner
On 3 Sep 2007 at 13:38, Andrew Curry wrote: > The problem is its unclear, its always better to be clear in code. It will > also remove any formatting from the end of lines. If you wanted to be just > as crude you can use chomp. I paritally agree that it could be un-clear. Perhaps s/\s+$//;

Re: how to remove ^M character from every line

2007-09-03 Thread Beginner
On 3 Sep 2007 at 17:26, divya wrote: > A file generated on Windows machine is used on linux m/c while scripting. > A sample line from the file is as shown: > > //---^M > File name : project_name^M > . > > Now in the perl script how can I r

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
On 30 Aug 2007 at 10:07, Mumia W. wrote: > On 08/30/2007 09:37 AM, Beginner wrote: > > [...] > > > > I tried the INIT option and that worked also and I liked the fact > > that my `perl -c myscript.pl` sent it's output to screen and not my > > log f

Re: marine subroutine

2007-08-30 Thread Beginner
On 30 Aug 2007 at 17:29, Martin Barth wrote: > 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

Re: marine subroutine

2007-08-30 Thread Beginner
On 30 Aug 2007 at 1:18, anders wrote: > On 30 Aug, 09:39, [EMAIL PROTECTED] (Amichai Teumim) wrote: > > Hi > > > > I'm trying to understand subroutines. > > > > #!/usr/bin/perl > > > > &marine() > > > > sub marine { > > $n += 1; #Global variable $n > > print "Hello, sailor number $n!\n"; > > >

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
On 30 Aug 2007 at 10:59, Adriano Ferreira wrote: > On 8/30/07, Beginner wrote: > > > > BEGIN { unshift @INC, '/etc/perl'; > > This is better done with > > use lib qw(/etc/perl); use lib ('/etc/perl'); Well that seems to work :-). >

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
On 30 Aug 2007 at 6:32, Peter Scott wrote: > On Thu, 30 Aug 2007 10:32:01 +0100, Beginner wrote: > > I want all the output plus any error messages to got to a log file. I > > used the BEGIN block to direct STDERR into the file: > > > > BEGIN { > > ope

Logging STDERR and other output

2007-08-30 Thread Beginner
Hi, I want all the output plus any error messages to got to a log file. I used the BEGIN block to direct STDERR into the file: BEGIN { open(STDERR, ">>/usr/local/myreports/report.log") || die "Can't write to file: $!\n"; } use strict; use warnings; ... ### Start some logging ### my $lo

Re: Mirror service closure

2007-08-07 Thread Beginner
On 7 Aug 2007 at 5:44, Jeff Pang wrote: > >The Joint Information Systems Committee (JISC) run for academic > >institutions has closed the mirror service in the UK as of the 31st > >July. > > > > > What mirror?CPAN or perl.com? CPAN was one of them but they mirrored lots of O/S material, Fedora

Mirror service closure

2007-08-07 Thread Beginner
The Joint Information Systems Committee (JISC) run for academic institutions has closed the mirror service in the UK as of the 31st July. What a shame. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: problem with Sterling pound sign

2007-08-06 Thread Beginner
On 6 Aug 2007 at 12:50, Rob Dixon wrote: > Dermot Paikkos wrote: > > > > CGI; > > Mime::Lite; > > > > I am trying to take the input from a text field from a html page and > > send it as an email. The text contains a UK sterling £ sign. It looks > > fine on in the html page but when I send the mail

Re: Perl directory listing program

2007-06-12 Thread Beginner
On 12 Jun 2007 at 16:26, [EMAIL PROTECTED] wrote: > Looking for some help here you perl geniuses you : ) > > I need a program that will list all of the files in a directory. > Without any arguments the program will list only the files (not > directories) in the current directory. But I must have

Re: Using SOAP::Lite

2007-06-11 Thread Beginner
Going to top post because I am not referring to your code Mike as I am not experienced enough to help directly. Have you tried the +trace switch? use SOAP::Lite +trace; Also there is the yahoo group to try. Sorry if I am stating the obvious. Thanx, Dp. On 8 Jun 2007 at 12:02, Mike Blezien w

Re: Algorithm or module needed

2007-06-01 Thread Beginner
Thanx that's done exactly what I wanted. Dp. On 1 Jun 2007 at 16:34, Xavier Noria wrote: > On Jun 1, 2007, at 4:29 PM, Beginner wrote: > > > Hi, > > > > I am trying to copy some file from a removable HDD to a network > > drive. I want replicate the dir

Algorithm or module needed

2007-06-01 Thread Beginner
Hi, I am trying to copy some file from a removable HDD to a network drive. I want replicate the directory structure and omit un-needed files. The directory paths a 4-5 levels deep and I am trying to work out an efficient way to recreate the directory path. What I've been doing is using File::

CGI OO style

2007-05-04 Thread Beginner
Hi Again, I am trying to make a progressbar and am stuck. I might not sure if it my lack of understanding of the differences between the OO style or function-oriented style (to paraphrase the Stein-monster) of writing CGI scripts. Script 1 uses the function style and works albeit with one java

module namespace

2007-05-04 Thread Beginner
Hi, I am using 2 modules under the GGI tree. If I remove CGI and use CGI::ProgressBar, am I importing all the methods from the CGI module still? My experiments suggest not but I thought I read that @INC will search up the tree. If I do this #use CGI qw/:standard/; use CGI::ProgressBar qw/:s

Re: Regexp

2007-04-25 Thread Beginner
On 25 Apr 2007 at 18:58, Somu wrote: > why wont the following work? > > $q = shift; > $p = "pass"; > if ( $q =~ m/$p/i ) { print 'match' } > > But it works on changing the $q and $p places.. Not sure but it works for me. #!/bin/perl use strict; use warnings; my $q = shift; my $p = "pass

A little bit of SOAP

2007-04-20 Thread Beginner
Hi, I am trying my hand a SOAP::Lite and wanted some enlightenment. I have created a test file (soaptest.pl) which acts as a server. soaptest has a subroutine called ReNameTiff which needs 2 arguments, a path to the original file and a new name for the file. Because SOAP::Lite is OO strange th

Re: Problems installing XML modules

2007-04-19 Thread Beginner
Hi, On 19 Apr 2007 at 12:21, Kaptein, A.M. wrote: > > Hello, > > I just started using Perl,and I want to install some module to handle XML > files. Below is the error message I get. > Could someone help me ? Please tell me if you need some more information > about the problem. > > Thanks

Re: Uninstalling perl module

2007-04-13 Thread Beginner
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

Can I map this

2007-04-04 Thread Beginner
Hi All, I have a list of names all in uppercase that I would like to capitaIise. I can't help but think that map could make short work of this loop but I am not sure how. Is it possible to use map here instead of a for loop? I can see there are going to be issues with double-barrelled names bu

Trying to make things portable

2007-04-02 Thread Beginner
Hi, I am trying to group some common subroutines into a module. As I use both Win32 and *nix systems I wanted the the routines that use the file system to be able to work in both environments and handle paths like /var/path/to/dir and h:\home\dir equally well. I know that perl will treat h:/ho

Re: XML parsing REST responses - RESOLVED

2007-03-29 Thread Beginner
On 29 Mar 2007 at 12:39, Beginner wrote: > Hi, > > I might be in above my head here so bear with me if I am not making > sense. > > I have to retrieve and extract an xml fragment from a REST server. I > have followed some examples from the "Web Services" boo

Re: To Reference or not to reference

2007-03-29 Thread Beginner
Hi On 29 Mar 2007 at 12:51, Dukelow, Don wrote: > I've written a Perl program that declares a hash at the top of the > program "%myHask;". It has worked great until now when one sub program > seams to be making its own copy of the hash. I can find no typo's or > anything but there my still be o

XML parsing REST responses

2007-03-29 Thread Beginner
Hi, I might be in above my head here so bear with me if I am not making sense. I have to retrieve and extract an xml fragment from a REST server. I have followed some examples from the "Web Services" book. I am able to retrieve the data via LWP::UserAgent but I am baffled by the hash ref that

Regex problem with accented characters

2007-03-27 Thread Beginner
Hi, I am trying to extract the iso code and country name from a 3 column table (taken from en.wikipedia.org) and have noticed a problem with accented characters such as Ô. Below is my script and a sample of the data I am using. When I run the script the code beginning CI for Côte d'Ivoire returns

Re: How do I generate a hash from an xml document?

2007-03-26 Thread Beginner
On 26 Mar 2007 at 11:55, Dave Adams wrote: > What are the general steps to building a hash from and xml document? > > Here are my steps: > > 1. Read in xml document using XML::Simple > 2. Create and empty hash > 3. Loop through $VAR1 (the anonymous datastructure) and populate hash > > Is this t

RE: Some basic perl queries

2007-03-22 Thread Beginner
On 22 Mar 2007 at 8:59, Kumar, Akshay wrote: > Thanks for the people who responded to original query. > Another related query. > Whats the best way to specify common set of include library directories, > so that I don't end up including (use lib OR "-I") in each file using my > local modules. (rec

Re: escape character

2007-03-22 Thread Beginner
On 21 Mar 2007 at 20:05, Dr.Ruud wrote: > "Beginner" schreef: > > > The Iconv route hasn't been too successful either. I tried > > Text::Iconv->new('ISO8859-1','utf8'); > > Thinking that my data is currently ISO8859-1but the resul

Re: How to add a dir to @INC

2007-03-21 Thread Beginner
On 21 Mar 2007 at 0:00, Jeff Pang wrote: > > > > >1) > >use lib '/path/to/somedir'; > > > >2) unshift @INC, '/path/to/somedir'; > > > > This can't work when you add a path to @INC on runtime. > > BEGIN { > unshift @INC,'/path/...'; > } Do you mean you have to put it in a BEGIN block to wo

Re: escape character

2007-03-21 Thread Beginner
On 20 Mar 2007 at 12:55, Chas Owens wrote: > On 3/20/07, Beginner <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have a large, 1.3GB xml file that I was trying to validate. It > > turns out that the file has a lot of exotic characters in it such as: > > é &g

Re: How to add a dir to @INC

2007-03-21 Thread Beginner
On 21 Mar 2007 at 17:05, kilaru rajeev wrote: > Hi, > > Can anybody help me to add a directory to @INC variable? > > Thanks, > Rajeev Kilaru > Either of these should work. Put them at the top, before you use something from somedir. 1) use lib '/path/to/somedir'; 2) unshift @INC, '/path/to/

Re: tiff images

2007-03-21 Thread Beginner
On 20 Mar 2007 at 19:46, Chris Parker wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Rob Dixon wrote: > > Chris Parker wrote: > >> > >> Hello all, > >> > >> How do I get text out of a tiff image? Scenario is that I have alot of > >> directories named (ex. 000, 020, 000) with files

escape character

2007-03-20 Thread Beginner
Hi, I have a large, 1.3GB xml file that I was trying to validate. It turns out that the file has a lot of exotic characters in it such as: é è Ä È ...etc The area of encoding and internationalisation is one I have no experience of at all and from what I've heard it is rather complex and difficult

Re: Sys::Gamin install error

2007-03-15 Thread Beginner
On 15 Mar 2007 at 8:20, Tom Phoenix wrote: > On 3/15/07, Beginner <[EMAIL PROTECTED]> wrote: > > > I have hit an error while trying to install Sys::Gamin. I can can run > > make but the `make test` is failing. > > > BEGIN failed--compilation aborted at t/gamin

Re: sprintf - Rounding down

2007-03-15 Thread Beginner
On 15 Mar 2007 at 8:05, Tom Phoenix wrote: > On 3/15/07, Beginner <[EMAIL PROTECTED]> wrote: > > > For some reason my sprintf usage is not returning the numbers I had > > expected and appears to be rounding down. Is there something wrong > > with my formatting be

sprintf - Rounding down

2007-03-15 Thread Beginner
Hi, For some reason my sprintf usage is not returning the numbers I had expected and appears to be rounding down. Is there something wrong with my formatting below. === code snip == my ($x,$y) = imgsize($fqn); my $size = $x*$y*3; my $ksiz

Sys::Gamin install error

2007-03-15 Thread Beginner
Hi, OS: FC4 With gamin-0.1.1-3.FC4 and gamin-devel-0.1.1-3.FC4 installed I have hit an error while trying to install Sys::Gamin. I can can run make but the `make test` is failing. The test file for Sys::Gamin reads: use Test; use SGI::FAM; plan tests => 1; ok (SGI::FAM::FAMChanged != SGI::FA

polling a directory

2007-03-14 Thread Beginner
Hi, I am trying to find a means of monitoring a directory for activity. I would like a perl process to aware if a file has been dropped into a specific folder and then take some action. In the past I have used cron for this but I was thinking this isn't the best choice because 1) You have to s

Re: Query regarding seek and tell

2007-03-12 Thread Beginner
On 12 Mar 2007 at 10:49, Tom Phoenix wrote: > On 3/12/07, Beginner <[EMAIL PROTECTED]> wrote: > > > What I am tring to do is find the x and y dimension of a jpeg > > Ah, Image::Size. > > http://search.cpan.org/~rjray/Image-Size-3.01/lib/Image/Size.pm > &g

Re: Removing blank lines

2007-03-12 Thread Beginner
On 12 Mar 2007 at 11:09, Grant wrote: > Hello, > > I'm having a lot of trouble figuring out how to remove blank lines > from my HTML. The lines are generated by my shopping cart. I use > (and highly recommend) interchange: > > http://www.icdevgroup.org > > I basically want to wrap all of my c

Re: Query regarding seek and tell

2007-03-12 Thread Beginner
On 12 Mar 2007 at 9:34, Tom Phoenix wrote: > On 3/12/07, Beginner <[EMAIL PROTECTED]> wrote: > > > When I ask for the filehandle position (tell) it is reporting the > > pointer as being a few bytes further along than I expect it to be. > > > binmode(FH); > &g

Query regarding seek and tell

2007-03-12 Thread Beginner
Hi, When I ask for the filehandle position (tell) it is reporting the pointer as being a few bytes further along than I expect it to be. For instance if I do this: #!/bin/perl use strict; use warnings; my ($start,$d,$var); my $file = 'myjpeg.jpg'; open(FH,$file) or die "Can't open $file: $!\n

Centralised variables - different issue

2007-03-06 Thread Beginner
Hi, Following on from the earlier thread about storing common code in a central file, I have hit a problem when trying to do something similar. I have been toying with SOAP. There seems to be a number of ways to create SOAP services and I opted for one of the examples at guide.soaplite.com.

Re: centralized variable variables

2007-03-06 Thread Beginner
On 6 Mar 2007 at 6:08, Jeff Pang wrote: > Is it possible to send an variable (through the env or as an > >argument, or ) so I can use the variable $dir from the module > >test.pl to set the variable $vardir in param.pl. ?? > > > > Yes you can. > You may declare the vars wanted to be shared

Re: Off-Topic: Is the Randall Schwartz of Perl Fame?

2007-03-05 Thread Beginner
Mega. About time too. On 5 Mar 2007 at 11:56, Mathew wrote: > http://articles.techrepublic.com.com/2100-1009_11-6164113.html?tag=nl.e019 > > Mathew > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

SOAP query

2007-03-05 Thread Beginner
Hi, I am trying to get started with SOAP. I am using mod_perl::Registry, the server script is below. I want to verify that the number of arguments being passed to the server is correct. In the snip below I presumed all the arguments would be items with @_ but it looks like all the arguments ar

Re: A long shot

2007-02-28 Thread Beginner
On 28 Feb 2007 at 9:58, Tom Phoenix wrote: > On 2/28/07, Beginner <[EMAIL PROTECTED]> wrote: > > > I have a list of files: > > > > hash.buckets > > page.index > > page.wordlist > > word.list > > word.index > > hash.file > > >

A long shot

2007-02-28 Thread Beginner
Hi All, This is a long shot. I have a list of files: hash.buckets page.index page.wordlist word.list word.index hash.file They are part of a SQL/Apache/mod_perl installation and these are some kind of indices for searches. I want to examine the contents if possible. It's quite possible that

Re: URL too long

2007-02-28 Thread Beginner
method doesnt allow very very long url's ... > how can I use POST from Perl code? do you have any example? > > Thanks! > T > > > On 2/28/07, Beginner <[EMAIL PROTECTED]> wrote: > > > > I think GET request are restricted to 256 characters, try using POS

Re: URL too long

2007-02-28 Thread Beginner
I think GET request are restricted to 256 characters, try using POST instead. HTH, Dp. On 28 Feb 2007 at 18:57, Tatiana Lloret Iglesias wrote: > Hi all, > > i have to browse a very long URL from my PERL script and it fails: > > http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITO

Re: Record separator and regex switch

2007-02-26 Thread Beginner
On 26 Feb 2007 at 18:13, D. Bolliger wrote: > Beginner am Montag, 26. Februar 2007 17:02: > > On 26 Feb 2007 at 15:58, D. Bolliger wrote: > > > Beginner am Montag, 26. Februar 2007 14:50: > > Hi > > > > > I am trying to parse some dhcp-lease files to e

Re: Record separator and regex switch

2007-02-26 Thread Beginner
On 26 Feb 2007 at 15:58, D. Bolliger wrote: > Beginner am Montag, 26. Februar 2007 14:50: > > Hi, > > Hi > > > I am trying to parse some dhcp-lease files to extract the ip, mac and > > hostname. > > > > I am struggling to get either, the regex o

Record separator and regex switch

2007-02-26 Thread Beginner
Hi, I am trying to parse some dhcp-lease files to extract the ip, mac and hostname. I am struggling to get either, the regex of the $/, correct. I am not sure which combination of these I should use. There is some sample data and my best effort below. Can anyone offer any pointers? TIA, Dp.

[SOLVED]: Recommend a module for IP discovery

2007-02-15 Thread Beginner
On 15 Feb 2007 at 11:46, Beginner wrote: > Hi All, > > I need to discover all the used ip addresses on my subnet, hopefully > getting the netbios name as well and any other details. > > Basically i ran out of dhcp leases today. I need to increase the size > of the pool

Recommend a module for IP discovery

2007-02-15 Thread Beginner
Hi All, I need to discover all the used ip addresses on my subnet, hopefully getting the netbios name as well and any other details. Basically i ran out of dhcp leases today. I need to increase the size of the pool but want to have some details of what hosts are using what before I make any ch

Re: Printing in preprinted invoice

2007-02-02 Thread Beginner
On 1 Feb 2007 at 9:30, Patricio A. Bruna wrote: > Hi, > Anyone knows a easier method, that guest and try, to print an invoice in a > prepinted paper, i need to fill the gaps. > The size of the page is Letter. > I am not sure if this is easier but I use PDF::API2 but I think it's the same pr

Re: XML::Rules tests [was: Re: XML::LibXML navigation]

2007-01-22 Thread Beginner
On 22 Jan 2007 at 16:42, Igor Sutton wrote: > Hi Jenda, > > I read your message and gave XML::Rules a try, but the tests aren't ok > on Linux. You can change the last line of t/boilerplate.t from > > module_boilerplate_ok(File::Spec->catfile('\lib\XML\Rules.pm'); > > to > > module_boilerplate_

Re: printf

2007-01-18 Thread Beginner
On 18 Jan 2007 at 7:19, Hal Wigoda wrote: > for one thing, you need to add "\n" for newline. > > printf("%c12", $var); # prints $var12$var12 > > > > %s seems to give me no output at all. > > I wouldn't want a newline in the middle of my column heading. I would like a 12 character spacing betw

printf

2007-01-18 Thread Beginner
Hi all, Sorry I am sure this is a lame question. I want to print out some column (with heading) and I want them evenly spaced. I know this is a printf but the format eludes me. printf("%c12", $var); # prints $var12$var12 %s seems to give me no output at all. Any ideas? TIA, Dp. -- To uns

  1   2   >