Re: PDF::API2

2006-02-28 Thread The Ghost
What I meant by lacking was "insufficient". It tells me I create an xo_form object, but I don't understand how to place it into the PDF. I think I know what parameters to pass to it though: -type => 'a', -code => 'barcode000' Any ideas? Ryan On Feb 28, 2006, at 1:33 AM, Owen Cook wrote:

Re: PDF::API2

2006-02-28 Thread The Ghost
(ps, google didn't turn up anything more than the CPAN docs) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: PDF::API2

2006-02-28 Thread Owen
The Ghost wrote: > What I meant by lacking was "insufficient". It tells me I create an > xo_form object, but I don't understand how to place it into the PDF. I > think I know what parameters to pass to it though: > > -type => 'a', -code => 'barcode000' > > Any ideas? >> Place 'PDF API2 docum

Re: error messege: "subroutine Cwd::fastcwd redefined"

2006-02-28 Thread Frank Lee
Chas Owens wrote: On 2/27/06, Frank Lee <[EMAIL PROTECTED]> wrote: When I add "use Bio:Perl" in my script and run it in windows XP, it complains: subroutine Cwd::fastcwd redefined" at C:/per/lib/Cwd.pm line 700 subroutine Cwd::getcwd redefined at C:/per/lib/Cwd.pm line 700 subroutine Cwd::ab

Re: the way to get current index of an array

2006-02-28 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: > hi, perlers, Howdy, > Is there a simple way to get the current index of an array in loop yes > statement? the procondition is you cannot get this information from > array element. For example > > #!usr/bin/perl > my @arr = qw/a b c d e/; > for(@arr) > { > pr

separate input

2006-02-28 Thread Cinzia Sala
Dear all, I would like to separate my input text DB-file into single files each containing the information between the two separators "//" e.g. dog, cat, home home, dog, cat // pen, pencil, work // milk, water, wine wine, milk, water //end I have tried with this: do { $/="//\n"; $r

Re: the way to get current index of an array

2006-02-28 Thread Bob Showalter
[EMAIL PROTECTED] wrote: hi, perlers, Is there a simple way to get the current index of an array in loop statement? the procondition is you cannot get this information from array element. For example #!usr/bin/perl my @arr = qw/a b c d e/; for(@arr) { print "The No.?? element is $_\n"; }

Re: separate input

2006-02-28 Thread Jeff Pang
Hi, Just using regex expression you could do it simply as: t1.pl use strict; while(<>) { print $_ unless /^\/\/$/; } if your db-file is t1.txt,you could do: $ perl t1.pl t1.txt > outfile.txt HTH -Original Message- >From: Cinzia Sala <[EMAIL PROTECTED]> >Sent: Feb 28, 2006 1

Re: the way to get current index of an array

2006-02-28 Thread The Ghost
sub getIndex { my ($array, $value)[EMAIL PROTECTED]; my $x=0; foreach (@{$array}) { $_ eq $value ? return $x : $x++; } #only works if array has unique items and is slow, but could be easy if it fits your problem #personally, I don't recommend this, but maybe it's wh

Re: Help: Math::Pari won't install

2006-02-28 Thread Wiggins d'Anconia
RICHARD FERNANDEZ wrote: > I'm trying to build Math::Pari along the way to building Net::SFTP, but > the make fails with the following error: > > pariinl.h: In function `mulssmod': > pariinl.h:887: error: asm-specifier for variable `hiremainder' conflicts > with asm clobber list > pariinl.h:887: c

Re: error messege: "subroutine Cwd::fastcwd redefined"

2006-02-28 Thread Chas Owens
On 2/28/06, Frank Lee <[EMAIL PROTECTED]> wrote: > Chas Owens wrote: > > On 2/27/06, Frank Lee <[EMAIL PROTECTED]> wrote: > > > >> When I add "use Bio:Perl" in my script and run it in windows XP, it > >> complains: > >> > >> subroutine Cwd::fastcwd redefined" at C:/per/lib/Cwd.pm line 700 > >> subr

RE: Help: Math::Pari won't install

2006-02-28 Thread RICHARD FERNANDEZ
This has lingered long enough without response. Sorry it took me a while to get back to it after initially seeing it. I had this same problem a couple of years ago. It does appear that Math::PARI has an active maintainer again so you might try dropping him a line about this issue. I solved it by t

Re: Help: Math::Pari won't install

2006-02-28 Thread Wiggins d'Anconia
RICHARD FERNANDEZ wrote: > > Thanks for the response. I did manage to solve the Math::Pari install > problem by following Jeff Eggen's idea about configuring it with > machine=none. I have no idea about whether or not, as he mentions, it's > unusably slow because I proceeded with the rest of the

CPAN for the first time

2006-02-28 Thread Gallagher, Tim \(NE\)
I have been developing Perl programs on Windows computers for a few years now, now I have to develop scripts on Linux computers now. I hate to say it but I have never really done any Perl/Linux development, just shell scripting. I am having troubles getting Perl modules installed on my Linux box

Re: the way to get current index of an array

2006-02-28 Thread JupiterHost.Net
The Ghost wrote: sub getIndex { my ($array, $value)[EMAIL PROTECTED]; my $x=0; foreach (@{$array}) { $_ eq $value ? return $x : $x++; } #only works if array has unique items and is slow, but could be easy if it fits your problem #pers

Re: CPAN for the first time

2006-02-28 Thread Tom Phoenix
On 2/28/06, Gallagher, Tim (NE) <[EMAIL PROTECTED]> wrote: > I am having troubles getting Perl modules installed on > my Linux box using Cpan. So the module that I need is Net::SSH::Perl, > so I go "cpan> install Net::SSH::Perl" and it says that everything > installed correctly. "Net::SSH::Perl

regular expression in a variable

2006-02-28 Thread Curt Shaffer
I need to set a variable to a filename where only 1 section of the file is static. For example: $filename =~ /test/; Where the following: Print "$filename\n"; Would produce: 123test456.txt The only way I see this being possible is with regular expressions but I can't fo

RE: regular expression in a variable

2006-02-28 Thread Timothy Johnson
You're not being very clear what it is you're trying to do. I can see two ways of interpreting this. Regular expressions are mostly for checking the format of text to see if certain conditions "match". You might be asking how to do this: use strict; use warnings; open

RE: regular expression in a variable

2006-02-28 Thread Curt Shaffer
Thanks for the response. Let me try to clear things up. The second solution will not work for me because the other parts of the filename will be unknown. The only part I know will always be in the filename is "test" (only an example). So the full story is this: I need to look in a directory to s

RE: regular expression in a variable

2006-02-28 Thread Timothy Johnson
So what part are you stuck on then? It looks like the first suggestion gets you the $filename you want. All you have to do after that is move it. (you can change it so it isn't looking in the current directory with the opendir line, but if you do, don't forget that you can't move the files by f

RE: regular expression in a variable

2006-02-28 Thread Curt Shaffer
That appears to work! The part I am stuck on is how to I take that value (which would now be $file in your example) and put it into a variable that I can use through the rest of the script. When I then try to use $file outside of that routine, it is no longer the same value. I really appreciate yo

RE: regular expression in a variable

2006-02-28 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Curt Shaffer wrote: > That appears to work! The part I am stuck on is how to I take that > value (which would now be $file in your example) and put it into a > variable that I can use through the rest of the script. When I then > try to use $file outside of that routine, it is no longer the same >

RE: regular expression in a variable

2006-02-28 Thread Curt Shaffer
Yes I am trying to collect the file (the result will only produce 1 match) And I need that into a variable that can be used for the processing. -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 28, 2006 4:19 P

Re: separate input

2006-02-28 Thread Chas Owens
On 2/28/06, Cinzia Sala <[EMAIL PROTECTED]> wrote: snip > }until ($/="//end"); snip You have two problems here. The first is that you are doing an assignment (=) not a comparison (==), so the result is always true (hence the printing of only one record). The second is a misunderstand of

RE: regular expression in a variable

2006-02-28 Thread Timothy Johnson
If you declare a variable with my(), it only exists within the current scope (NOTE: always add 'use strict' and 'use warnings' whenever you can at the top of your scripts). What you'll have to do is declare a variable outside of the brackets. You could even use a subroutine, like the one below.

Lifetime of my() variables

2006-02-28 Thread Tom Phoenix
On 2/28/06, Timothy Johnson <[EMAIL PROTECTED]> wrote: > If you declare a variable with my(), it only exists within the current > scope Not to be too picky, but it's more accurate to say that it's the variable's *name* that's restricted to the given scope. The variable itself exists so long as th

RE: Lifetime of my() variables

2006-02-28 Thread Timothy Johnson
An important distinction. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Tuesday, February 28, 2006 3:21 PM To: Timothy Johnson Cc: beginners@perl.org Subject: Lifetime of my() variables On 2/28/06, Timothy Johnson <[EMAIL PR

Re: regular expression in a variable

2006-02-28 Thread Tommy Grav
The $file is only valid inside the foreach scope. To get a global value use: use strict; use warnings; my $file # the variable is now global opendir(DIR,".") or die("Couldn't open the current directory!\n"); my @files = readdir(DIR); foreach $file(sort @files){ # The my has been removed in

Array of arrays

2006-02-28 Thread Tommy Grav
I have a file of numbers that I want to read in and put the first 12 lines into row one of of a two-dimensional array, the next 12 into row two and so on. my $nref = 12 ; my $n = 0 ; my $im = 0 ; my @refstars ; my @refmag ; while (<>) {

RE: Array of arrays

2006-02-28 Thread Timothy Johnson
The code you posted does not return any errors. Check the parts you didn't post. -Original Message- From: Tommy Grav [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 28, 2006 1:48 PM To: beginners@perl.org Cc: Tommy Grav Subject: Array of arrays I have a file of numbers that I want to

RE: regular expression in a variable

2006-02-28 Thread Curt Shaffer
Thank you all so much. And thank you timothy for the clarification. I do use the use strict. I don't tend to use the warnings much, guess maybe I should at least during development. Thanks Again! Curt -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, Febr

Re: Array of arrays

2006-02-28 Thread Bob Showalter
Tommy Grav wrote: print $refstars[1][0] ; # <- This is line 38 However this code returns an error I do not understand Missing right curly or square bracket at refstar.pl line 38, at end of line syntax error at refstar.pl line 38, at EOF Execution of refstar.pl aborted due to

Re: separate input

2006-02-28 Thread John W. Krahn
Cinzia Sala wrote: > Dear all, Hello, > I would like to separate my input text DB-file into single files > each containing the information between the two separators "//" > > > e.g. > > dog, cat, home > home, dog, cat > // > pen, pencil, work > // > milk, water, wine > wine, milk, water >

答复: the way to get current index of an arr ay

2006-02-28 Thread zhao_bingfeng
> -邮件原件- > 发件人: JupiterHost.Net [mailto:[EMAIL PROTECTED] > 发送时间: 2006年2月28日 21:54 > 收件人: beginners@perl.org > 主题: Re: the way to get current index of an array > > > > [EMAIL PROTECTED] wrote: > > hi, perlers, > > Howdy, Thanks or your and others reply > > > Is there a simple way

Re: Lifetime of my() variables

2006-02-28 Thread Jeff Pang
Tom is very right.It's a closure indeed.:-) -Original Message- >From: Tom Phoenix <[EMAIL PROTECTED]> >Sent: Mar 1, 2006 7:20 AM >To: Timothy Johnson <[EMAIL PROTECTED]> >Cc: beginners@perl.org >Subject: Lifetime of my() variables > >On 2/28/06, Timothy Johnson <[EMAIL PROTECTED]> wrote:

Re: error messege: "subroutine Cwd::fastcwd redefined"

2006-02-28 Thread Frank Lee
Chas Owens wrote: On 2/28/06, Frank Lee <[EMAIL PROTECTED]> wrote: Chas Owens wrote: On 2/27/06, Frank Lee <[EMAIL PROTECTED]> wrote: When I add "use Bio:Perl" in my script and run it in windows XP, it complains: subroutine Cwd::fastcwd redefined" at C:/per/lib/Cwd.pm line 700

Re: error messege: "subroutine Cwd::fastcwd redefined"

2006-02-28 Thread Tom Phoenix
On 2/27/06, Frank Lee <[EMAIL PROTECTED]> wrote: > subroutine Cwd::fastcwd redefined" at C:/per/lib/Cwd.pm line 700 > subroutine Cwd::getcwd redefined at C:/per/lib/Cwd.pm line 700 > subroutine Cwd::abs_path redefined at C:/per/lib/Cwd.pm line 700 > > The script can still works. Could you tell me

Re: Array of arrays

2006-02-28 Thread Tommy Grav
Disregard my previous email as it was another error further up in the program. Typical beginners mistake I guess :) Cheers Tommy [EMAIL PROTECTED] http://homepage.mac.com/tgrav/ "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a