Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Illegal Seek - Any Hints

Reply
Thread Tools

Illegal Seek - Any Hints

 
 
codefixer@gmail.com
Guest
Posts: n/a
 
      04-04-2005
Hi,

I have a script in which I have " do $test" where $test refers to a
different perl script, say foo.pl

In foo.pl when the control is trying to execute my$result =
qx/\.\/test"/ I am getting an error saying Illegal seek. (All other
statements execute just fine).

I browsed through some past messages here but still couldn't find
anything that works.

Any hints on what I coud do ? Is their a way to diagnose this "illegal
seek" message further ????


Thanks for your help.

 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      04-04-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> I have a script in which I have " do $test" where $test refers to a
> different perl script, say foo.pl
>
> In foo.pl when the control is trying to execute my$result =
> qx/\.\/test"/ I am getting an error saying Illegal seek. (All other
> statements execute just fine).


You need to copy-and-paste the actual error message and the actual
statement in question. Re-typing the line is prone to typographical
errors, which obviously happened in this case.

That qx statement is all messed up. Lose the \ and change delimiters:

my $result = qx{./test}; # Using alternate delimiters
my $result = `./test`; # Or using the simple syntax

From your description, it sounds like you are running ./test from
the command line, which invokes foo.pl, which executes ./test again.

"Illegal seek" has no meaning to us unless you include:
*) The name of the file where the error was detected,
*) The line number of the statement that failed,
*) And copy-and-paste the line in question.

And
use strict;
use warnings;
use diagnostics;

-Joe
 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      04-04-2005
(E-Mail Removed) <(E-Mail Removed)> wrote:

> trying to execute my$result =
> qx/\.\/test"/ I am getting an error saying Illegal seek.

^
^

The name of the program has a double quote character in it?

Please use copy/paste rather than attempting to retype code.


> Any hints on what I coud do ?



Post actual Perl code.

Post a short and complete program *that we can run* that
duplicates the problem.

Include the *verbatim* text of any messages you get.

See the Posting Guidelines that are posted here frequently.


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
xhoster@gmail.com
Guest
Posts: n/a
 
      04-04-2005
(E-Mail Removed) wrote:
> Hi,
>
> I have a script in which I have " do $test" where $test refers to a
> different perl script, say foo.pl


Well, stop doing that. Execute foo.pl directly until you get the kinks
worked out, then go back to "do"ing it.

>
> In foo.pl when the control is trying to execute my$result =
> qx/\.\/test"/ I am getting an error saying Illegal seek. (All other
> statements execute just fine).


Why choose / as the delimiter when it forces you to escape a literal /?
Do you have an actual program named ./test" ?

>
> I browsed through some past messages here but still couldn't find
> anything that works.
>
> Any hints on what I coud do ? Is their a way to diagnose this "illegal
> seek" message further ????


In my experience, "illegal seek" generally means that I inspected $! when
I had no business doing so, i.e. when there was not an actual error.

Xho

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Illegal seek with os.popen pruebauno@latinmail.com Python 4 06-04-2009 09:28 PM
hints for find-as-you-type hints cbossens73@yahoo.fr Java 2 04-08-2009 11:08 AM
When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer? DR ASP .Net 2 07-29-2008 09:50 AM
When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer? DR ASP .Net Building Controls 0 07-29-2008 01:37 AM
illegal seek smarty C Programming 16 05-16-2008 07:39 PM



Advertisments