[27962] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9326 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 20 18:05:46 2006

Date: Tue, 20 Jun 2006 15:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 20 Jun 2006     Volume: 10 Number: 9326

Today's topics:
        asyncrhronous system call <cNaOlSePbA@MvPeLtEsAtSaEr.com>
    Re: asyncrhronous system call <someone@example.com>
    Re: asyncrhronous system call <sherm@Sherm-Pendleys-Computer.local>
    Re: File::Find - passing argument to &wanted <tzz@lifelogs.com>
    Re: Find repeating substring <msgrinnell@charter.net>
    Re: Find repeating substring <msgrinnell@charter.net>
    Re: Find repeating substring xhoster@gmail.com
    Re: Find repeating substring <msgrinnell@charter.net>
    Re: fork messing up parent filehandle <hjp-usenet2@hjp.at>
    Re: fork messing up parent filehandle xhoster@gmail.com
    Re: noob asks: differences Activestate 5.8.x vs 5.6.x.  noob@public.com
    Re: noob asks: differences Activestate 5.8.x vs 5.6.x.  <hjp-usenet2@hjp.at>
    Re: OO Perl help for a dot Net convert? <hjp-usenet2@hjp.at>
        perl / ajax / js / quoting question <seven.reeds@gmail.com>
    Re: perl / ajax / js / quoting question <sherm@Sherm-Pendleys-Computer.local>
    Re: problem in calling program in my perl script <Deb.Fang@gmail.com>
    Re: question on printing to /dev/lp <"v.niekerk at hccnet.nl">
    Re: question on printing to /dev/lp <sherm@Sherm-Pendleys-Computer.local>
        Spreadsheet::ParseExcel to find out if there is a Strik <reshma.rr@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 20 Jun 2006 15:16:45 -0600
From: Spin <cNaOlSePbA@MvPeLtEsAtSaEr.com>
Subject: asyncrhronous system call
Message-Id: <129gpduais665b6@corp.supernews.com>

What I need to do is partway between the functionality of system and 
exec. My understanding of system() is that it runs the process and waits 
for completion before continuing the script. Also as I understand it 
exec() runs the process but abandons the script, so the script will not 
continue. What I am looking for is my script to continue running but the 
system call to not hold up the script. I want it to launch and do its 
thing on its own. How can I do this?

Thanks,
Caleb


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

Date: Tue, 20 Jun 2006 21:27:42 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: asyncrhronous system call
Message-Id: <iLZlg.63312$A8.20023@clgrps12>

Spin wrote:
> What I need to do is partway between the functionality of system and
> exec. My understanding of system() is that it runs the process and waits
> for completion before continuing the script. Also as I understand it
> exec() runs the process but abandons the script, so the script will not
> continue. What I am looking for is my script to continue running but the
> system call to not hold up the script. I want it to launch and do its
> thing on its own. How can I do this?

perldoc -q "How do I start a process in the background"


John
-- 
use Perl;
program
fulfillment


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

Date: Tue, 20 Jun 2006 17:30:07 -0400
From: Sherm Pendley <sherm@Sherm-Pendleys-Computer.local>
Subject: Re: asyncrhronous system call
Message-Id: <m24pyfv7kw.fsf@Sherm-Pendleys-Computer.local>

Spin <cNaOlSePbA@MvPeLtEsAtSaEr.com> writes:

> What I need to do is partway between the functionality of system and
> exec. My understanding of system() is that it runs the process and
> waits for completion before continuing the script. Also as I
> understand it exec() runs the process but abandons the script, so the
> script will not continue. What I am looking for is my script to
> continue running but the system call to not hold up the script. I want
> it to launch and do its thing on its own. How can I do this?

The command to launch a background task varies from OS to OS. On a given
OS, it will be the same command regardless of whether you're using system()
to run it, or typing it manually into a shell. Just be sure to use the
one-arg variant of system(), to make sure the command is interpreted by a
shell.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Tue, 20 Jun 2006 14:51:53 -0400
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: File::Find - passing argument to &wanted
Message-Id: <g69wtbbzmly.fsf@CN1374059D0130.kendall.corp.akamai.com>

On 18 Jun 2006, uri@stemsystems.com wrote:

> you can go for [PHP] but don't expect any encouragement from me or
> most here. 

Well that's pretty obvious in this Perl newsgroup.  I see very few
recommendations here (Abigail used to do it) for alternate tools,
e.g. using awk when it's all that's needed.  I wish there were more.

> php is just a toy that kiddies love.

This and other things you said are pretty unfair.  I know Perl, I've
used PHP, and they do different things well.  Disdain for an entire
community (PHP or others) is not productive.  Emacs Lisp doesn't have
namespaces, does that make it a kiddie language?  Assembler doesn't
have <insert feature here>, does that make it primitive?

Ted


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

Date: 20 Jun 2006 11:06:07 -0700
From: "Mike" <msgrinnell@charter.net>
Subject: Re: Find repeating substring
Message-Id: <1150826767.193559.81400@y41g2000cwy.googlegroups.com>

Your solution still leaves the code 37.33/2 in the result.


xhoster@gmail.com wrote:
> "Mike" <msgrinnell@charter.net> wrote:
> > Hi All,
> >
> > I need a regular expression to find repeating substrings (in particular
> > the substring that starts in position 1 of the string and is repeated
> > elsewhere in the string).  For example, in the case below, the
> > substring of interest would be "HEART (CONDUCTION DEFECT)".
> >
> > Thanks much for any insights,
> >
> > Mike
> >
> > HEART (CONDUCTION DEFECT)  37.33/2  HEART (CONDUCTION DEFECT) WITH
> > CATHETER 37.34/2
>
> This seems pretty simple.  What am I missing?
>
> /^(.*).*\1/s
>
> Xho
>
> --
> -------------------- http://NewsReader.Com/ --------------------
> Usenet Newsgroup Service                        $9.95/Month 30GB



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

Date: 20 Jun 2006 11:21:25 -0700
From: "Mike" <msgrinnell@charter.net>
Subject: Re: Find repeating substring
Message-Id: <1150827685.908096.155770@y41g2000cwy.googlegroups.com>

What I have is 24,000 lines of ICD9 index entries with appended codes
that used to be stored in a format like below and processed one time
per year by an OS390 (then printed out).  These are index entries for
ICD9 codes that now have been moved to a web service.  The web services
are all "code-centric" and the index entries are just properties of the
codes now.  The gist of the problem is that I need to format each entry
(for example that of ablation) into a tree-view that users can peruse
for codes.  I believe I can do this recursively be reading each string
until the first word changes then pulling the repeating first and
subsequent words (which are then the root).  Then, remove the root and
process what is left of each substring in turn until the base case is
hit (no repeating substrings).

The owner of the webservices is not willing to change the format of the
data.  I may be able to do a one-time process (Perl) or on-demand
depending on performance.

A tree view would look like

Ablation
   Endometrial (Hysteroscopic) 68.23
   Heart (Conduction Defect) 27.33/2
      With Catheter 37.34/2
   Inner Ear (Cryosurgery) (Ultrasound) 20.79/4
      By Injection 20.72
   Lesion Heart
      By Peripherally Inserted Catheter 37.34

etc etc.....

The raw index entries would look like below.

ABLATION ENDOMETRIAL (HYSTEROSCOPIC)	68.23
ABLATION HEART (CONDUCTION DEFECT)	37.33/2
ABLATION HEART (CONDUCTION DEFECT) WITH CATHETER	37.34/2
ABLATION INNER EAR (CRYOSURGERY) (ULTRASOUND)	20.79/4
ABLATION INNER EAR (CRYOSURGERY) (ULTRASOUND) BY INJECTION	20.72
ABLATION LESION HEART BY PERIPHERALLY INSERTED CATHETER	37.34
ABLATION LESION HEART ENDOVASCULAR APPROACH	37.34
ABLATION LESION HEART MAZE PROCEDURE (COX-MAZE) ENDOVASCULAR
APPROACH	37.34
ABLATION LESION HEART MAZE PROCEDURE (COX-MAZE) OPEN (TRANS-THORACIC)
APPROACH	37.33
ABLATION LESION HEART MAZE PROCEDURE (COX-MAZE) TRANS-THORACIC
APPROACH	37.33
ABLATION PITUITARY	7.69
ABLATION PITUITARY BY COBALT-60	92.32
ABLATION PITUITARY BY IMPLANTATION (STRONTIUM-YTTRIUM) (Y) NEC	92.39
ABLATION PITUITARY BY PROTON BEAM (BRAGG PEAK)	92.33
ABLATION PROSTATE (ANAT = 59.02) BY LASER, TRANSURETHRAL	60.21
ABLATION PROSTATE (ANAT = 59.02) BY RADIOFREQUENCY THERMOTHERAPY	60.97
ABLATION PROSTATE (ANAT = 59.02) BY TRANSURETHRAL NEEDLE ABLATION
(TUNA)	60.97
ABLATION PROSTATE (ANAT = 59.02) PERINEAL BY CRYOABLATION	60.62
ABLATION PROSTATE (ANAT = 59.02) PERINEAL BY RADICAL CRYOSURGICAL
ABLATION (RCSA)	60.62
ABLATION PROSTATE (ANAT = 59.02) TRANSURETHRAL BY LASER	60.21
ABLATION PROSTATE (ANAT = 59.02) TRANSURETHRAL CRYOABLATION	60.29
ABLATION PROSTATE (ANAT = 59.02) TRANSURETHRAL RADICAL CRYOSURGICAL
ABLATION (RCSA)	60.29
ABLATION TISSUE HEART - SEE ABLATION, LESION, HEART	0
ABLATION VESICLE NECK (ANAT = 60.02)	57.91





Ted Zlatanov wrote:
> On 20 Jun 2006, msgrinnell@charter.net wrote:
>
> bugbear wrote: > Mike wrote:
> >>> Hi All,
> >>>
> >>> I need a regular expression to find repeating substrings (in particular
> >>> the substring that starts in position 1 of the string and is repeated
> >>> elsewhere in the string).  For example, in the case below, the
> >>> substring of interest would be "HEART (CONDUCTION DEFECT)".
> >>>
> >>> Thanks much for any insights,
> >>>
> >>> Mike
> >>>
> >>>
> >>>
> >>> HEART (CONDUCTION DEFECT)  37.33/2  HEART (CONDUCTION DEFECT) WITH
> >>> CATHETER 37.34/2
> >>>
> >>
> >> That sounds related to this:
> >>
> >> http://www.cs.sunysb.edu/~algorith/files/longest-common-substring.shtml
> >>
> >> and may be beyond a regexp.
> >>
> >> BugBear
> >
> > Thank you for the reference.  This problem while simple at first glance
> > has so far proved quite challenging for me.
>
> You asked a very open-ended question that, while theoretically
> interesting, may not be the real problem in your case.  Can you try to
> restate your request in a different way, for example:
>
> "I want to extract data where the format is
>
> [LABEL] [NUMBER] [LABEL][EXTRA_INFORMATION1] [NUMBER] [LABEL][EXTRA_INFORMATION2] [NUMBER]"
>
> And then explain the syntax of [LABEL] and [EXTRA_INFORMATION*] if
> possible?
> 
> Ted



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

Date: 20 Jun 2006 18:40:43 GMT
From: xhoster@gmail.com
Subject: Re: Find repeating substring
Message-Id: <20060620144129.023$HZ@newsreader.com>

"Mike" <msgrinnell@charter.net> wrote:

Please don't top post.  Top posting fixed.

> xhoster@gmail.com wrote:
> > "Mike" <msgrinnell@charter.net> wrote:
> > > Hi All,
> > >
> > > I need a regular expression to find repeating substrings (in
> > > particular the substring that starts in position 1 of the string and
> > > is repeated elsewhere in the string).  For example, in the case
> > > below, the substring of interest would be "HEART (CONDUCTION
> > > DEFECT)".
> > >
> > > Thanks much for any insights,
> > >
> > > Mike
> > >
> > > HEART (CONDUCTION DEFECT)  37.33/2  HEART (CONDUCTION DEFECT) WITH
> > > CATHETER 37.34/2
> >
> > This seems pretty simple.  What am I missing?
> >
> > /^(.*).*\1/s
> >
> > Xho

> Your solution still leaves the code 37.33/2 in the result.

No, it does not.


$ perl -l
$_ = 'HEART (CONDUCTION DEFECT)  37.33/2  HEART (CONDUCTION DEFECT)
WITH CATHETER 37.34/2';
if (/^(.*).*\1/) {
     print "Result: $1";
}
__END__
Result: HEART (CONDUCTION DEFECT)

See, no 37.33/2 in the result!

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 20 Jun 2006 11:51:57 -0700
From: "Mike" <msgrinnell@charter.net>
Subject: Re: Find repeating substring
Message-Id: <1150829517.687834.183020@c74g2000cwc.googlegroups.com>

xhoster@gmail.com wrote:
> "Mike" <msgrinnell@charter.net> wrote:
>
> Please don't top post.  Top posting fixed.
>
> > xhoster@gmail.com wrote:
> > > "Mike" <msgrinnell@charter.net> wrote:
> > > > Hi All,
> > > >
> > > > I need a regular expression to find repeating substrings (in
> > > > particular the substring that starts in position 1 of the string and
> > > > is repeated elsewhere in the string).  For example, in the case
> > > > below, the substring of interest would be "HEART (CONDUCTION
> > > > DEFECT)".
> > > >
> > > > Thanks much for any insights,
> > > >
> > > > Mike
> > > >
> > > > HEART (CONDUCTION DEFECT)  37.33/2  HEART (CONDUCTION DEFECT) WITH
> > > > CATHETER 37.34/2
> > >
> > > This seems pretty simple.  What am I missing?
> > >
> > > /^(.*).*\1/s
> > >
> > > Xho
>
> > Your solution still leaves the code 37.33/2 in the result.
>
> No, it does not.
>
>
> $ perl -l
> $_ = 'HEART (CONDUCTION DEFECT)  37.33/2  HEART (CONDUCTION DEFECT)
> WITH CATHETER 37.34/2';
> if (/^(.*).*\1/) {
>      print "Result: $1";
> }
> __END__
> Result: HEART (CONDUCTION DEFECT)
>
> See, no 37.33/2 in the result!
>
> Xho
>
> --

Sorry.  My mistake.  I ran the Perl script with your suggestion and no
37.33/2 (as you noted).  As I am trying to also see if this will work
in C# code (on demand) I ran it on Expresso as ^(.*).*\1 against the
same string and it left the code. Different implementation?   I only
use regular expressions irregularly and so am merely dangerous with
them.



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

Date: Tue, 20 Jun 2006 21:50:39 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: fork messing up parent filehandle
Message-Id: <gij97e.fo3.ln@teal.hjp.at>

xhoster@gmail.com wrote:
> "darksaga" <darksaga_work@yahoo.com> wrote:
>> problem is that the fork command seems to mess up the parent filehandle
>> to my file, altough the children do not use this filehandle. when
>> looping through the file, the filehandle is magically reset to the
>> beginning of the file, or a position near the beginning. (see code
>> below)
> 
> Solaris is buggy on closing forked file handles--when one copy closes
> it screws up the other copies.

This seems to be a rather severe violation of POSIX behaviour. Closing a
file descriptor in one process should never affect a file descriptor in
another process (unless they refer to opposite ends of a pipe or socket,
of course). Is this new in Solaris 10 or a long-standing Solaris bug?

        hp

-- 
   _  | Peter J. Holzer    | Man könnte sich [die Diskussion] auch
|_|_) | Sysadmin WSR/LUGA  | sparen, wenn man sie sich einfach sparen
| |   | hjp@hjp.at         | würde.
__/   | http://www.hjp.at/ |   -- Ralph Angenendt in dang 2006-04-15


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

Date: 20 Jun 2006 21:12:50 GMT
From: xhoster@gmail.com
Subject: Re: fork messing up parent filehandle
Message-Id: <20060620171337.141$Pw@newsreader.com>

"Peter J. Holzer" <hjp-usenet2@hjp.at> wrote:
> xhoster@gmail.com wrote:
> > "darksaga" <darksaga_work@yahoo.com> wrote:
> >> problem is that the fork command seems to mess up the parent
> >> filehandle to my file, altough the children do not use this
> >> filehandle. when looping through the file, the filehandle is magically
> >> reset to the beginning of the file, or a position near the beginning.
> >> (see code below)
> >
> > Solaris is buggy on closing forked file handles--when one copy closes
> > it screws up the other copies.
>
> This seems to be a rather severe violation of POSIX behaviour. Closing a
> file descriptor in one process should never affect a file descriptor in
> another process (unless they refer to opposite ends of a pipe or socket,
> of course). Is this new in Solaris 10 or a long-standing Solaris bug?

Currently I can only test it on SunOS 5.8, but I think I've seen it
under older versions without really understanding what was going on.
(I have no idea what the difference is between Solaris and SunOS,
uname says SunOS while OSTYPE and perl -v say Solaris.  If this
distinction is important, then take what I say with a grain of salt.)

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Tue, 20 Jun 2006 11:50:37 -0700
From: noob@public.com
Subject: Re: noob asks: differences Activestate 5.8.x vs 5.6.x. pros vs cons of each?
Message-Id: <2fgg92tam06hblecvceadm1f00bu1cou9v@4ax.com>

So except for a possible mem problem mentioned here, there are no real
differences? Meaning differences in capabilities or in module
installation. I have 5.6.1.638 which is updated from a several years
old installation, and find that very little of the CPAN stuff will
load, not even the latest CPAN itself.

If it is the same with 5.8.whatever_is_current, then I guess I'm
stuck.


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

Date: Tue, 20 Jun 2006 21:58:29 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: noob asks: differences Activestate 5.8.x vs 5.6.x. pros vs cons of each?
Message-Id: <51k97e.0q3.ln@teal.hjp.at>

noob@public.com wrote:
> So except for a possible mem problem mentioned here, there are no real
> differences?

Who said that? There are lots of differences. People said there are few
reasons to stay with 5.6. Most perl scripts written for 5.6 (or 5.5)
will still work with 5.8, but the converse isn't necessarily true.


> Meaning differences in capabilities or in module
> installation. I have 5.6.1.638 which is updated from a several years
> old installation, and find that very little of the CPAN stuff will
> load, not even the latest CPAN itself.

Which is an excellent reason to upgrade to 5.8.x. Very few people will
still test their modules with 5.6.x.

However, on Windows you are probably better off using PPM instead of
CPAN. Many CPAN modules need a C-compiler.

        hp

-- 
   _  | Peter J. Holzer    | Man könnte sich [die Diskussion] auch
|_|_) | Sysadmin WSR/LUGA  | sparen, wenn man sie sich einfach sparen
| |   | hjp@hjp.at         | würde.
__/   | http://www.hjp.at/ |   -- Ralph Angenendt in dang 2006-04-15


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

Date: Tue, 20 Jun 2006 21:44:07 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: OO Perl help for a dot Net convert?
Message-Id: <76j97e.tm3.ln@teal.hjp.at>

Anno Siegel wrote:
> Peter J. Holzer wrote:
>> ben.wilder@gmail.com wrote:
> 
> [snippage]
> 
>> So I think, passing references to arrays is generally the best way.
>> 
>> You can of course make a copy of the array in the constructor:
>> 
>>       _myFavouriteArtists     =>      [ @{ $arg{myFavouriteArtists} } ],
>> 
>> if you want to. I found this rarely to be necessary,
> 
> It is practically always necessary to copy any references before
> using them in an object.  Just consider a loop like this:
> 
>     while ( <> ) {
>         my ( $first, $last, $age, @artists) = split;
>         push @somewhere, MyPackage->new( $first, $last, $age, \ @artists);
>     }
> 
> All the objects created in this loop will *share* their internal
> myFavouriteArtists array and will show the same favourite artists
> unless you copy the array on object creation.

Actually, no. In this case each run through the loop will create a new
instance of @artists.

Run this program, and you will see that the addresses will change and
that the contents are correctly preserved:

----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
#!/usr/bin/perl
use warnings;
use strict;

package Foo;

sub new {
    my ($class, $arr) = @_;
    my $self = { arr => $arr };
    bless $self => $class;
    return $self;
}

sub getarr {
    my ($self) = @_;
    return $self->{arr};
}

package main;

my @foo;
while (<>) {
    chomp;
    my (@arr) = split;
    push @foo, Foo->new(\@arr);
}

for (@foo) {
    my $arr = $_->getarr;
    print "$arr @$arr\n";
}
----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----

There are cases where copying is necessary, but since this can only be
determined from reading the code of the caller I find it more logical to
do the copying in the caller:

    push @foo, Foo->new([@arr]);

    $arr[5] = "foo";
    push @arr, "baz";

    push @foo, Foo->new([@arr]);

Or something like that.


        hp

-- 
   _  | Peter J. Holzer    | Man könnte sich [die Diskussion] auch
|_|_) | Sysadmin WSR/LUGA  | sparen, wenn man sie sich einfach sparen
| |   | hjp@hjp.at         | würde.
__/   | http://www.hjp.at/ |   -- Ralph Angenendt in dang 2006-04-15


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

Date: 20 Jun 2006 13:49:34 -0700
From: "seven.reeds" <seven.reeds@gmail.com>
Subject: perl / ajax / js / quoting question
Message-Id: <1150836574.268380.114450@c74g2000cwc.googlegroups.com>

Hi,

I am not a js expert by any stretch and this might be a js question
more than perl so fingers crossed...

Ok, I am doing some ajax and have this '<input type='file"' input that
I am working on.  It is accepting image files.  When its value changes
I want to display the image in an associated DIV.  I am building the
html and js lines in a perl script.  THe relevant section looks like:

        $HTML .= <<EOF;
        <p><label for="IThumbnail">Path to Thumbnail</label>
        <input type="file" name="IThumbnail" id="IThumbnail"
               size=50
               accept="image/gif,image/jpeg"
               onchange="
               document.getElementById('IThumbnailImageDiv').innerHTML
=
                   '<img src="file://' +
                   document.getElementById('IThumbnail').value +
                   '" alt="upload file" />'; return false; " /></p>

        <div id="IThumbnailImageDiv"
             style="float:left;
                    clear:both;">
        </div>
EOF

I'm testing this with FireFox and have the js Console open.  It tells
me that there are mis-matching quotes starting at:   '<img

I have tried quoting the double quotes inside the IMG tag I am building
with "\" and "\\" but neither works.  This has to be a simple mistake
but I am not seeing it.

help?



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

Date: Tue, 20 Jun 2006 17:22:58 -0400
From: Sherm Pendley <sherm@Sherm-Pendleys-Computer.local>
Subject: Re: perl / ajax / js / quoting question
Message-Id: <m2bqsnv7wt.fsf@Sherm-Pendleys-Computer.local>

"seven.reeds" <seven.reeds@gmail.com> writes:

> I am not a js expert by any stretch and this might be a js question
> more than perl so fingers crossed...

Sorry - it is a JS question. The problem is with the JS code that you're
printing, not with the Perl code you're using to print it. If you pasted
that snippet directly into a static HTML file (with no Perl involved at
all), you'd get precisely the same error.

That said...

I would try putting the JS in a separate .js file, importing it with a
<script> element, and then calling it with a simple function call in your
onChange attribute. Nesting languages two and three deep tends to cause
problems - as you you've discovered here.

If you need more help with this, try comp.lang.javascript.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: 20 Jun 2006 11:43:27 -0700
From: "debbie523" <Deb.Fang@gmail.com>
Subject: Re: problem in calling program in my perl script
Message-Id: <1150829007.126129.188970@b68g2000cwa.googlegroups.com>


krakle@visto.com wrote:
> debbie523 wrote:
> > I have a program named p1.c, it works file in windows(the p1.exe works
> > file).
> > But it does not work in my perl script.
> >
> > Part of my script is as following:
> >
> > #!/bin/perl -w
> >
> > use CGI;
>
> Where is "use strict;". MANY problems can be resolved with using this
> pragma... So:
>
> #!/bin/perl -w
>
> use strict; # Just keep it
> use warnings; # For testing
> use diagnostics;  # For testing
>
> use CGI;
>
> >
> > $query=new CGI;
> >
>
> my $query = new CGI;
>
> > my $nominees=$query->param('n1');
> > my $nominations=$query->param('n2');
> > my $leaders=$query->param('n3');
> > my $followers=$query->param('n4');
> > my $filename=$query->param('f1');
>
> Although not *important* for running code... It helps if your code is
> more readable
>
> my $nominees    = $query->param('n1');
> my $nominations = $query->param('n2');
> my $leaders     = $query->param('n3');
> my $followers   = $query->param('n4');
> my $filename    = $query->param('f1');
>
>
> > exec ("p1.exe");
>
> Does p1.exe even exist to execute?
yes, it does exist. But it looks like not called by my perl program.
Because I can't see welcome printed in my op.txt file. But if I run it
in windows, it works good.



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

Date: Tue, 20 Jun 2006 22:04:08 +0200
From: Huub <"v.niekerk at hccnet.nl">
Subject: Re: question on printing to /dev/lp
Message-Id: <449854b9$0$26769$e4fe514c@dreader20.news.xs4all.nl>

> No, I don't. I mean e.g. 
> 
>     open my $LPR, '|-', qw/lpr -Pprinter/ or die "can't fork lpr: $!";
> 
> but with the appropriate syntax for the lpr(1) or lp(1) on your system.
> Please learn how printing works on your system before trying to do it
> from Perl. As I said, on most Unixen printing is through one of the
> *programs* lpr or lp; but the syntax and accepted formats vary.
> 
> Ben
> 

I know how to deal with printing on Linux and BSD. Using apsfilter and 
lpr. Just with Perl it's new to me. Thank you.


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

Date: Tue, 20 Jun 2006 16:44:24 -0400
From: Sherm Pendley <sherm@Sherm-Pendleys-Computer.local>
Subject: Re: question on printing to /dev/lp
Message-Id: <m28xnrsgk7.fsf@Sherm-Pendleys-Computer.local>

Huub <"v.niekerk at hccnet.nl"> writes:

> I know how to deal with printing on Linux and BSD. Using apsfilter and
> lpr. Just with Perl it's new to me. Thank you.

And now for something completely different... :-)

Have you had a look at the various CUPS modules on CPAN?

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: 20 Jun 2006 12:02:13 -0700
From: "Reshma" <reshma.rr@gmail.com>
Subject: Spreadsheet::ParseExcel to find out if there is a Strikeout
Message-Id: <1150830133.077687.34330@y41g2000cwy.googlegroups.com>

I'm using Spreadsheet::ParseExcel to read an excel spreadsheet and
generate an XML file out of it. I want to exclude the line items that
are Struck out in the spreadsheet. Can some one tell me what would be
the syntax for finding if a cell has "Strikeout"?

Thanks for your help.



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

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 V10 Issue 9326
***************************************


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