[30736] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1981 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 13 21:09:47 2008

Date: Thu, 13 Nov 2008 18:09:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 13 Nov 2008     Volume: 11 Number: 1981

Today's topics:
        Download HiYo 7.00.1579 - A free add-on for Messenger . <anubha9903@gmail.com>
    Re: Editor with embedded perl interpreter? <cartercc@gmail.com>
    Re: Editor with embedded perl interpreter? <peter@makholm.net>
    Re: Editor with embedded perl interpreter? <cartercc@gmail.com>
    Re: Editor with embedded perl interpreter? <peter@makholm.net>
    Re: Editor with embedded perl interpreter? <cartercc@gmail.com>
    Re: How to check whether a file is being opened by othe <tim@burlyhost.com>
    Re: How to check whether a file is being opened by othe <xiyou.wangcong@gmail.com>
    Re: How to check whether a file is being opened by othe <tim@burlyhost.com>
        iterating through perl object fields <mafjmafj@googlemail.com>
    Re: iterating through perl object fields <spamtrap@dot-app.org>
    Re: iterating through perl object fields <someone@example.com>
    Re: iterating through perl object fields <spamtrap@dot-app.org>
    Re: Just can't seem to figure out how to do this in per <sbryce@scottbryce.com>
    Re: Just can't seem to figure out how to do this in per <cartercc@gmail.com>
    Re: Just can't seem to figure out how to do this in per sln@netherlands.com
    Re: Just can't seem to figure out how to do this in per <smallpond@juno.com>
    Re: Just can't seem to figure out how to do this in per sln@netherlands.com
    Re: Text::ParseWords (Darren Dunham)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 13 Nov 2008 10:46:02 -0800 (PST)
From: Anubha Sarkar <anubha9903@gmail.com>
Subject: Download HiYo 7.00.1579 - A free add-on for Messenger ...
Message-Id: <562ea7fd-a621-4f79-9055-acee52d85707@r15g2000prh.googlegroups.com>

Download HiYo 7.00.1579 - A free add-on for Messenger ...

7 Nov 2008 ... HiYo A free add-on for Windows Live Messenger, offering
Winks and Animations.

http://www.hiyo.coz.bz


------------------------------

Date: Thu, 13 Nov 2008 08:44:58 -0800 (PST)
From: cartercc <cartercc@gmail.com>
Subject: Re: Editor with embedded perl interpreter?
Message-Id: <2135439e-eb37-4d0f-81f2-3b1ab24f48b0@o4g2000pra.googlegroups.com>

On Nov 12, 3:48=A0pm, Paolo <la...@19yahoo.com> wrote:
> Do you know an editor which allows the execution of Perl-script
> on selected text?

I see two things here, both of which I would classify as semi-
important.

(1) For my money, vi is simply without any question far better than
any other editor. The benefits vi gives you are far greater than
anything you might get with a Lisp-like top level that interactively
executes your scripts.

(2) That said, I find the absence of a Perl top level somewhat
curious. Python has one, and interactive building of scripts can be
helpful. Why doesn't Perl have a top level?

CC


------------------------------

Date: Thu, 13 Nov 2008 18:14:06 +0100
From: Peter Makholm <peter@makholm.net>
Subject: Re: Editor with embedded perl interpreter?
Message-Id: <87d4gz8s69.fsf@vps1.hacking.dk>

cartercc <cartercc@gmail.com> writes:

> (2) That said, I find the absence of a Perl top level somewhat
> curious. Python has one, and interactive building of scripts can be
> helpful. Why doesn't Perl have a top level?

I have no idea what you're asking about, but Devel::REPL might be the
answer.

(and 'perl -de1' another simpler answer)

//Makholm


------------------------------

Date: Thu, 13 Nov 2008 10:30:48 -0800 (PST)
From: cartercc <cartercc@gmail.com>
Subject: Re: Editor with embedded perl interpreter?
Message-Id: <71139429-b0a7-40c9-8608-823f0a437db1@t39g2000prh.googlegroups.com>

On Nov 13, 12:14=A0pm, Peter Makholm <pe...@makholm.net> wrote:
> cartercc <carte...@gmail.com> writes:
> > (2) That said, I find the absence of a Perl top level somewhat
> > curious. Python has one, and interactive building of scripts can be
> > helpful. Why doesn't Perl have a top level?
>
> I have no idea what you're asking about, but Devel::REPL might be the
> answer.
>
> (and 'perl -de1' another simpler answer)
>
> //Makholm

An environment where you can evaluate expressions. In EMACS for
example, you can interactively evaluate Lisp expressions and functions
until they do what you want, and then add them to a source file. You
build your programs one expression or function at a time in a bottom
up fashion. This also helps with errors, since no expression gets
added to the source until it performs as expected -- therefore, you
never get any compile or run error when you compile the source.

CC


------------------------------

Date: Thu, 13 Nov 2008 20:31:25 +0100
From: Peter Makholm <peter@makholm.net>
Subject: Re: Editor with embedded perl interpreter?
Message-Id: <878wrn8lte.fsf@vps1.hacking.dk>

cartercc <cartercc@gmail.com> writes:

> An environment where you can evaluate expressions. In EMACS for

Then I lied as both Devel::REPL and the standard perl debugger with a
trivial script (perl -de1) will provide you with the read, print,
eval loop you want.

//Makholm


------------------------------

Date: Thu, 13 Nov 2008 12:51:21 -0800 (PST)
From: cartercc <cartercc@gmail.com>
Subject: Re: Editor with embedded perl interpreter?
Message-Id: <90f75c80-913c-4b5c-aa0d-5f67385940ff@x16g2000prn.googlegroups.com>

On Nov 13, 2:31=A0pm, Peter Makholm <pe...@makholm.net> wrote:
> cartercc <carte...@gmail.com> writes:
> Then I lied as both Devel::REPL and the standard perl debugger with a
> trivial script (perl -de1) will provide you with the read, print,
> eval loop you want.

Thanks for your help.

I have two computers, both PCs, one running Windows XP and the other
Red Hat 7.3, both with Perl 5.8. On my Windows machine, PPM can't find
Devel-REPL and CPAN doesn't work (this is running ActiveState). On my
Linux machine, CPAN reported a successful install of Devel-REPL but
can't find it. I don't have time to look at it today, but I'll follow
up on it.

As to the Debugger, I use it occasionally, but it's pretty creaky
compared to the debugger in, say, Visual Studio. In EMACS, you can
compile and load in one key chord and run your compiled code IN THE
SAME ENVIRONMENT. IOW, the editor, run time, and interpreter all work
together. You can modify the same function a dozen times and run it in
a couple of minutes, and you can also look at the stack trace if you
want to. This is NOT how the Perl debugger works.

CC


------------------------------

Date: Thu, 13 Nov 2008 09:48:11 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: How to check whether a file is being opened by other programs in Perl script?
Message-Id: <wLZSk.23271$M_1.18209@newsfe01.iad>

Kuhl wrote:

> Hi, in my Perl script, I need to operate on a file. But I need to
> check whether the file is being opened by any other programs, for
> example vi, and then my operation will be performed based on this
> check result. How to do this check? Thanks.

As others have suggested, look into using file locking.  Just keep in
mind, that any program or process that will be reading the file also
needs to obey the same rules with locking.  As the saying goes with
file locking "If any single program or process reads, opens or writes
to the file without following the rules, all bets are off".
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


------------------------------

Date: Thu, 13 Nov 2008 18:32:57 +0000
From: WANG Cong <xiyou.wangcong@gmail.com>
Subject: Re: How to check whether a file is being opened by other programs in Perl script?
Message-Id: <gfhrt0$c3a$1@aioe.org>

Kuhl wrote:

> Hi, in my Perl script, I need to operate on a file. But I need to
> check whether the file is being opened by any other programs, for
> example vi, and then my operation will be performed based on this
> check result. How to do this check? Thanks.

perl -e 'print qx{/usr/sbin/lsof | grep foo.cfg}, "\n";'



------------------------------

Date: Thu, 13 Nov 2008 10:57:18 -0800
From: Tim Greer <tim@burlyhost.com>
Subject: Re: How to check whether a file is being opened by other programs in Perl script?
Message-Id: <iM_Sk.3162$Yu5.3014@newsfe24.iad>

WANG Cong wrote:

> Kuhl wrote:
> 
>> Hi, in my Perl script, I need to operate on a file. But I need to
>> check whether the file is being opened by any other programs, for
>> example vi, and then my operation will be performed based on this
>> check result. How to do this check? Thanks.
> 
> perl -e 'print qx{/usr/sbin/lsof | grep foo.cfg}, "\n";'

Except that won't help if the file is opened/read right after that ran,
before the perl script does its work.  That may create a race
condition.
-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


------------------------------

Date: Thu, 13 Nov 2008 10:54:32 -0800 (PST)
From: Mafj <mafjmafj@googlemail.com>
Subject: iterating through perl object fields
Message-Id: <1fe04671-c36b-4f3c-9e88-ac3d98108c54@o4g2000pra.googlegroups.com>

Hi,

I am a complete beginner I tried to find some information on the
topic, however, I have only found how to deal with arrays and
associative arrays. All documentation seems to be helpless with an
object/structure.

I have a fixed structure like this (comes from external file):

$self->{data} = {
                  'ver' => 2,
                  'list' => {
                             'name1' => 'item1',
                             'different_name' => 'another_item',
                             'whatever' => 'special_item',
# and 1000 more
                  }
};
I need a content of $self->{data}->{list}. I do knot know field names
nor keys.
There is probably some simple loop, foreach or while,e.g.
 (   ($c,$v) = each %self->{data}->{list} ).
But I cannot figure out the details that would finally let it work.
Help...






------------------------------

Date: Thu, 13 Nov 2008 14:02:11 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: iterating through perl object fields
Message-Id: <m1prkze9fw.fsf@dot-app.org>

Mafj <mafjmafj@googlemail.com> writes:

> I have a fixed structure like this (comes from external file):
>
> $self->{data} = {
>                   'ver' => 2,
>                   'list' => {
>                              'name1' => 'item1',
>                              'different_name' => 'another_item',
>                              'whatever' => 'special_item',
> # and 1000 more
>                   }
> };
> I need a content of $self->{data}->{list}. I do knot know field names
> nor keys.
> There is probably some simple loop, foreach or while,e.g.
>  (   ($c,$v) = each %self->{data}->{list} ).

You're pretty close. To begin with, since $self->{data}->{list} is a
reference to a hash, you need to dereference it with %$ in order to work
with the hash it refers to.

And second, you can get a list of hash keys with the keys (perldoc -f
keys) function:

    my @listKeys = keys(%$self->{data}->{list});

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Thu, 13 Nov 2008 17:09:08 -0800
From: "John W. Krahn" <someone@example.com>
Subject: Re: iterating through perl object fields
Message-Id: <Nc4Tk.19$iT.1@newsfe21.iad>

Sherm Pendley wrote:
> Mafj <mafjmafj@googlemail.com> writes:
> 
>> I have a fixed structure like this (comes from external file):
>>
>> $self->{data} = {
>>                   'ver' => 2,
>>                   'list' => {
>>                              'name1' => 'item1',
>>                              'different_name' => 'another_item',
>>                              'whatever' => 'special_item',
>> # and 1000 more
>>                   }
>> };
>> I need a content of $self->{data}->{list}. I do knot know field names
>> nor keys.
>> There is probably some simple loop, foreach or while,e.g.
>>  (   ($c,$v) = each %self->{data}->{list} ).
> 
> You're pretty close. To begin with, since $self->{data}->{list} is a
> reference to a hash, you need to dereference it with %$ in order to work
> with the hash it refers to.
> 
> And second, you can get a list of hash keys with the keys (perldoc -f
> keys) function:
> 
>     my @listKeys = keys(%$self->{data}->{list});

ITYM: my @listKeys = keys %{$self->{data}->{list}};

$ perl -le'
my $self = { data => { list => { "a" .. "f" } } };
print for keys %$self->{data}->{list};
'
Type of arg 1 to keys must be hash (not hash element) at -e line 3, near 
"};"
Execution of -e aborted due to compilation errors.




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.                            -- Larry Wall


------------------------------

Date: Thu, 13 Nov 2008 20:49:16 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: iterating through perl object fields
Message-Id: <m14p2bcc0z.fsf@dot-app.org>

"John W. Krahn" <someone@example.com> writes:

> Sherm Pendley wrote:
>> Mafj <mafjmafj@googlemail.com> writes:
>>
>>> I have a fixed structure like this (comes from external file):
>>>
>>> $self->{data} = {
>>>                   'ver' => 2,
>>>                   'list' => {
>>>                              'name1' => 'item1',
>>>                              'different_name' => 'another_item',
>>>                              'whatever' => 'special_item',
>>> # and 1000 more
>>>                   }
>>> };
>>> I need a content of $self->{data}->{list}. I do knot know field names
>>> nor keys.
>>> There is probably some simple loop, foreach or while,e.g.
>>>  (   ($c,$v) = each %self->{data}->{list} ).
>>
>> You're pretty close. To begin with, since $self->{data}->{list} is a
>> reference to a hash, you need to dereference it with %$ in order to work
>> with the hash it refers to.
>>
>> And second, you can get a list of hash keys with the keys (perldoc -f
>> keys) function:
>>
>>     my @listKeys = keys(%$self->{data}->{list});
>
> ITYM: my @listKeys = keys %{$self->{data}->{list}};

Yep, you're right. That's what I get for banging out code in a post
without testing it. :-(

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Thu, 13 Nov 2008 08:02:47 -0700
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: Just can't seem to figure out how to do this in perl
Message-Id: <gfhfip$g09$1@news.eternal-september.org>

Bill H wrote:
<snipped description of problem translating from screen coordinates to 
PDF page coordinates>

> The problem I have is, trying to come up with a algorythm that will
> translate the one set of coordinates into the other.

Assuming the resolution of the PDF page is the same as the resolution of 
the Flash object...


$pdf_x_position = $flash_x_position;
$pdf_y_position = $pdf_page_height - $flash_y_position;

But images in Flash are positioned by the upper left corner (I assume) 
and images in PDF are positioned by the lower left corner, so you need 
to adjust for that as well.

$pdf_y_position = $pdf_page_height - $flash_y_position - $image_size;

You may also need to adjust for differing resolutions.

$pdf_x_position = $flash_x_position / $flash_object_width * $pdf_page_width;

$pdf_y_position = ($pdf_page_height - $flash_y_position - $image_size) / 
$flash_object_height * $pdf_page_height;


I haven't tested any of that, but I think I have it right.


------------------------------

Date: Thu, 13 Nov 2008 08:14:01 -0800 (PST)
From: cartercc <cartercc@gmail.com>
Subject: Re: Just can't seem to figure out how to do this in perl
Message-Id: <0c1707fe-0e8b-4ee4-9f96-d48f8910f9cb@r15g2000prh.googlegroups.com>

On Nov 13, 6:46=A0am, Bill H <b...@ts1000.us> wrote:
> So, if I have a page that is 5 1/2" x 8 1/2" inches, or 396 x 612
> (using 72dpi) and I am placing a 1" x 1" image at 1" x 1" (x,y =3D 72,72
> in flash and width =3D 72, and height =3D 72) then my x,y =A0coordinates =
in
> perl whould be 72,540.
>
> The problem I have is, trying to come up with a algorythm that will
> translate the one set of coordinates into the other.

Perfect sense. I have also struggled with PDF and Perl, so I
sympathize.

Since the PDF placement is measured from the bottom, subtract the
object height from the page height. IOW, if the page height is 612 and
the object height (measured from the top) is 72, 612 - 72 =3D 540.

CC


------------------------------

Date: Thu, 13 Nov 2008 17:01:28 GMT
From: sln@netherlands.com
Subject: Re: Just can't seem to figure out how to do this in perl
Message-Id: <f5noh4pmp52bslprst2ns6tobdr71lcp82@4ax.com>

On Thu, 13 Nov 2008 03:46:12 -0800 (PST), Bill H <bill@ts1000.us> wrote:

>I have been trying to figure out how to do this in perl for weeks and
>justcan't seem to fingure it out. I can see it in my mind how it
>should work.
>
>The problem I have is this. I have a flash interface that sends perl
>some image coordinates that perl then uses to make pdf's using
>pdf:api2. In flash I use the standard coordinate system:
>
>0,0------------------> X
>|
>|
>|
>v
>Y
>
>(ie x,y is starts at top left corner). So I will send the perl program
>a image coordinate in the format of x,y,width,height.
>
>Now on the prl side, making the pdf the coordinate system is:
>
>Y
>|
>|
>|
>|
>0,0 ------------------> X
>
>(ie x,y starts at bottom left corner) and I need to translate the
>flash coordinates to the perl / pdf coordinates.
>
>So, if I have a page that is 5 1/2" x 8 1/2" inches, or 396 x 612
>(using 72dpi) and I am placing a 1" x 1" image at 1" x 1" (x,y = 72,72
>in flash and width = 72, and height = 72) then my x,y  coordinates in
>perl whould be 72,540.
>
>The problem I have is, trying to come up with a algorythm that will
>translate the one set of coordinates into the other.
>
>I hope I am making sense.
>
>Bill H

I don't know why you try to obfucate the issue with 
> ...  and I am placing a 1" x 1" image at 1" x 1"
Whats that all about?

You can do something complicated like this:

sln
----------------------------

use strict;
use warnings;

sub ConvertInchesToDots
{
	my ($dpi, $inchref) = @_;
	my @dots = ();
	for (@$inchref) {
		push @dots, ($_ * $dpi);
	}
	return \@dots;
}
sub FlashToPdfCoords
{
	my  ($dpi, $refFlashCoords) = @_;
	my $refpdfcoords = ConvertInchesToDots ($dpi, $refFlashCoords);
	$refpdfcoords->[1] = $refpdfcoords->[3] - $refpdfcoords->[1]; # pdfY = dpi * (flashH - flashY)
	return @$refpdfcoords;
}


my @Flashcoords = (1, 1, 5.5, 8.5);	# x,y,width,height
my @Pdfcoords   = FlashToPdfCoords (72, \@Flashcoords);

print "\nPdf ( X, Y, Width, Heigth ) = Flash ( X, Y, Width, Heigth )\n";
print "Pdf (@Pdfcoords) = Flash (@Flashcoords)\n";


__END__


Pdf ( X, Y, Width, Heigth ) = Flash ( X, Y, Width, Heigth )
Pdf (72 540 396 612) = Flash (1 1 5.5 8.5)




------------------------------

Date: Thu, 13 Nov 2008 09:04:56 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: Just can't seem to figure out how to do this in perl
Message-Id: <61f4d3e7-2e9b-4b7e-b1d2-b0576b5ae7cc@k36g2000pri.googlegroups.com>

On Nov 13, 6:46 am, Bill H <b...@ts1000.us> wrote:
> I have been trying to figure out how to do this in perl for weeks and
> justcan't seem to fingure it out. I can see it in my mind how it
> should work.
>
> The problem I have is this. I have a flash interface that sends perl
> some image coordinates that perl then uses to make pdf's using
> pdf:api2. In flash I use the standard coordinate system:
>
> 0,0------------------> X
> |
> |
> |
> v
> Y
>
> (ie x,y is starts at top left corner). So I will send the perl program
> a image coordinate in the format of x,y,width,height.
>
> Now on the prl side, making the pdf the coordinate system is:
>
> Y
> |
> |
> |
> |
> 0,0 ------------------> X
>
> (ie x,y starts at bottom left corner) and I need to translate the
> flash coordinates to the perl / pdf coordinates.
>
> So, if I have a page that is 5 1/2" x 8 1/2" inches, or 396 x 612
> (using 72dpi) and I am placing a 1" x 1" image at 1" x 1" (x,y = 72,72
> in flash and width = 72, and height = 72) then my x,y  coordinates in
> perl whould be 72,540.
>
> The problem I have is, trying to come up with a algorythm that will
> translate the one set of coordinates into the other.
>
> I hope I am making sense.
>
> Bill H

No need to reinvent the wheel.

The CPAN module to do this generally is called
Geometry::AffineTransform.
You set up a matrix to do any 2D -> 2D coordinate transform, which
will let you scale/convert units, rotate, translate, etc.
If your units are inches and you want to convert to points then you
are
scaling by 72, for example.


------------------------------

Date: Thu, 13 Nov 2008 17:44:16 GMT
From: sln@netherlands.com
Subject: Re: Just can't seem to figure out how to do this in perl
Message-Id: <dkpoh4tbhnbp6ltqh5blq26tifd6dmj9uq@4ax.com>

On Thu, 13 Nov 2008 17:01:28 GMT, sln@netherlands.com wrote:

>On Thu, 13 Nov 2008 03:46:12 -0800 (PST), Bill H <bill@ts1000.us> wrote:
>
>>I have been trying to figure out how to do this in perl for weeks and
>>justcan't seem to fingure it out. I can see it in my mind how it
>>should work.
>>
>>The problem I have is this. I have a flash interface that sends perl
>>some image coordinates that perl then uses to make pdf's using
>>pdf:api2. In flash I use the standard coordinate system:
>>
>>0,0------------------> X
>>|
>>|
>>|
>>v
>>Y
>>
>>(ie x,y is starts at top left corner). So I will send the perl program
>>a image coordinate in the format of x,y,width,height.
>>
>>Now on the prl side, making the pdf the coordinate system is:
>>
>>Y
>>|
>>|
>>|
>>|
>>0,0 ------------------> X
>>
>>(ie x,y starts at bottom left corner) and I need to translate the
>>flash coordinates to the perl / pdf coordinates.
>>
>>So, if I have a page that is 5 1/2" x 8 1/2" inches, or 396 x 612
>>(using 72dpi) and I am placing a 1" x 1" image at 1" x 1" (x,y = 72,72
>>in flash and width = 72, and height = 72) then my x,y  coordinates in
>>perl whould be 72,540.
>>
>>The problem I have is, trying to come up with a algorythm that will
>>translate the one set of coordinates into the other.
>>
>>I hope I am making sense.
>>
>>Bill H
>
>I don't know why you try to obfucate the issue with 
>> ...  and I am placing a 1" x 1" image at 1" x 1"
>Whats that all about?
>
>You can do something complicated like this:
>
>sln
>----------------------------
>
>use strict;
>use warnings;
>
>sub ConvertInchesToDots
>{
>	my ($dpi, $inchref) = @_;
>	my @dots = ();
>	for (@$inchref) {
>		push @dots, ($_ * $dpi);
                            ^^^^^^^^^^^
		push @dots, (int(($_ * $dpi)+.5));

Forgot this. This will round then convert fractional inches to integer dots

>	}
>	return \@dots;
>}
>sub FlashToPdfCoords
>{
>	my  ($dpi, $refFlashCoords) = @_;
>	my $refpdfcoords = ConvertInchesToDots ($dpi, $refFlashCoords);
>	$refpdfcoords->[1] = $refpdfcoords->[3] - $refpdfcoords->[1]; # pdfY = dpi * (flashH - flashY)
>	return @$refpdfcoords;
>}
>
>
>my @Flashcoords = (1, 1, 5.5, 8.5);	# x,y,width,height
>my @Pdfcoords   = FlashToPdfCoords (72, \@Flashcoords);
>
>print "\nPdf ( X, Y, Width, Heigth ) = Flash ( X, Y, Width, Heigth )\n";
>print "Pdf (@Pdfcoords) = Flash (@Flashcoords)\n";
>
>
>__END__
>
>
>Pdf ( X, Y, Width, Heigth ) = Flash ( X, Y, Width, Heigth )
>Pdf (72 540 396 612) = Flash (1 1 5.5 8.5)
>



------------------------------

Date: Fri, 14 Nov 2008 00:56:13 GMT
From: ddunham@taos.com (Darren Dunham)
Subject: Re: Text::ParseWords
Message-Id: <N04Tk.8499$ZP4.664@nlpi067.nbdc.sbc.com>

howa <howachen@gmail.com> wrote:
> Consider the codes:
> #=====================
> use Text::ParseWords;
> use Data::Dumper;
> 
> my $query =qq^"abc  def" filetype:pdf def 'xyz 123' '^;

You have an item (the last one) with an unbalanced number of quotes.

> But if ...
> 
> my $query =qq^"abc  def" filetype:pdf def 'xyz 123' ''^;

Here you've balanced them.

Seems it is identical to :

parse_line(" ", 0, qq^'^);

It appears that parse_line returns false if the quotes do not balance.

-- 
Darren


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 1981
***************************************


home help back first fref pref prev next nref lref last post