Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default closed filehandle

    Hello
    when I run the code below I get
    readline() on closed filehandle DATA at practice.plx line 6.

    #!/usr/bin/perl

    use warnings;

    use strict;

    open DATA, 'home/username/data/avg' || die $!;

    while (<DATA>) {

    print $_;

    }


    Sam Guest

  2. Similar Questions and Discussions

    1. FileHandle::Unget 0.13 released
      Description: - FileHandle::Unget is a drop-in replacement for FileHandle which allows more than one byte to be placed back on the input. It...
    2. FILEHANDLE to print to nothing
      Howdy, I am benchmarking some stuff that does multiple print staements. What I'd like to do is print to a file handel so ethat the stuff I'm...
    3. How to put a filehandle into a hash array?
      I need to build an array of filehandles so different records go into different output files depending on a value. This is the code: $dt =...
    4. first.pl | second.pl with ARGV filehandle ?
      >>>>> "s" == stu7 <stuseven@hotmail.com> writes: s> + perl first.pl | perl second.pl something, something ARGV fh ? s> This is what I've seen...
    5. Using filehandle many times
      On 29 Jun 2003 23:43:42 -0700 cdcer@hongkong.com (ABC) wrote: In such cases, 'use diagnostics' might help you with what exactly you need to...
  3. #2

    Default Re: closed filehandle

    Sam wrote:
    > Hello
    > when I run the code below I get
    > readline() on closed filehandle DATA at practice.plx line 6.
    >
    line numbers added

    1 #!/usr/bin/perl
    2
    3 use warnings;
    4
    5 use strict;
    6
    7 open DATA, 'home/username/data/avg' || die $!;
    8
    9 while (<DATA>) {
    10
    11 print $_;
    12
    13 }

    Doubt it.

    --
    Kind regards, feel free to mail: mail(at)johnbokma.com (or reply)
    virtual home: [url]http://johnbokma.com/[/url] ICQ: 218175426
    John web site hints: [url]http://johnbokma.com/websitedesign/[/url]

    John Bokma Guest

  4. #3

    Default Re: closed filehandle

    Sam wrote:
    > Hello
    > when I run the code below I get
    > readline() on closed filehandle DATA at practice.plx line 6.
    >
    > #!/usr/bin/perl
    >
    > use warnings;
    >
    > use strict;
    >
    > open DATA, 'home/username/data/avg' || die $!;
    >
    > while (<DATA>) {
    >
    > print $_;
    >
    > }
    >
    >
    You need to be specific when passing file/path names to open(). Unless
    the script is running from your home directory (you passed a relative
    path), it won't work. Try:

    open DATA, '/home/username/data/avg' || die $!;

    HTH - keith

    ko Guest

  5. #4

    Default Re: closed filehandle

    Sam wrote:
    > when I run the code below I get
    > readline() on closed filehandle DATA at practice.plx line 6.
    >
    > use warnings;
    > use strict;
    > open DATA, 'home/username/data/avg' || die $!;
    There are two problems in this one line:
    Due to precedence rules it will be evaluated as
    open DATA, ('home/username/data/avg' || die $!);

    If you change this to
    open DATA, 'home/username/data/avg' or die $!;
    then probably you will get a runtime error "File does not exist" which
    points to the second problem:
    I'm guessing but probably you meant to open '/home/username/data/avg', not
    just 'home/username/data/avg'.

    jue



    > while (<DATA>) {
    > print $_;
    > }

    Jürgen Exner Guest

  6. #5

    Default Re: closed filehandle

    On Sun, 14 Sep 2003 09:36:27 GMT, Sam <samj@austarmetro.com.au> wrote:
    [snip]
    > open DATA, 'home/username/data/avg' || die $!;
    >
    I don't think this line does what you want it to do, because
    of precedence issues. Try instead (untested):

    open(DATA, 'home/username/data/avg') || die $!;

    or:

    open DATA, 'home/username/data/avg' or die $!;

    and read e.g.:

    [url]http://www.foo.be/docs/tpj/issues/vol4_3/tpj0403-0002.html[/url]

    John J. Trammell Guest

  7. #6

    Default Re: closed filehandle


    "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    news:Cj_8b.11126$NX3.9947@nwrddc01.gnilink.net...
    > Sam wrote:
    > > when I run the code below I get
    > > readline() on closed filehandle DATA at practice.plx line 6.
    > >
    > > use warnings;
    > > use strict;
    > > open DATA, 'home/username/data/avg' || die $!;
    >
    > There are two problems in this one line:
    > Due to precedence rules it will be evaluated as
    > open DATA, ('home/username/data/avg' || die $!);
    >
    > If you change this to
    > open DATA, 'home/username/data/avg' or die $!;
    > then probably you will get a runtime error "File does not exist" which
    > points to the second problem:
    > I'm guessing but probably you meant to open '/home/username/data/avg', not
    > just 'home/username/data/avg'.
    >
    > jue
    >
    >
    >
    >
    > > while (<DATA>) {
    > > print $_;
    > > }
    >
    >
    #!/usr/bin/perl
    use warnings;
    use strict;

    my $file = "home/user/data/avg";
    open DATA, $file or die $!;
    while (<DATA>) {
    print $_;
    }

    when I run it I get
    No such file or directory at practice.plx line 6.


    Sam Guest

  8. #7

    Default Re: closed filehandle

    "Sam" <samj@austarmetro.com.au> wrote in
    news:3f64b27b@news.comindico.com.au:
    >
    > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > news:Cj_8b.11126$NX3.9947@nwrddc01.gnilink.net...
    >> Sam wrote:
    >> > when I run the code below I get
    >> > readline() on closed filehandle DATA at practice.plx line 6.
    >> >
    >> > use warnings;
    >> > use strict;
    >> > open DATA, 'home/username/data/avg' || die $!;
    <snip>
    >> If you change this to
    >> open DATA, 'home/username/data/avg' or die $!;
    >> then probably you will get a runtime error "File does not exist"
    >> which points to the second problem:
    >> I'm guessing but probably you meant to open
    >> '/home/username/data/avg', not just 'home/username/data/avg'.
    <snip>
    >
    > #!/usr/bin/perl
    > use warnings;
    > use strict;
    >
    > my $file = "home/user/data/avg";
    > open DATA, $file or die $!;
    > while (<DATA>) {
    > print $_;
    > }
    >
    > when I run it I get
    > No such file or directory at practice.plx line 6.
    You don't really read the responses apparently. Please read what Jurgen
    pointed out as the second problem with the open call, and see if fixing
    that solves your issue.

    Sinan.

    --
    A. Sinan Unur
    [email]asu1@c-o-r-n-e-l-l.edu[/email]
    Remove dashes for address
    Spam bait: mailto:uce@ftc.gov
    A. Sinan Unur Guest

  9. #8

    Default Re: closed filehandle


    "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote in message
    news:Xns93F6A46C9676Easu1cornelledu@132.236.56.8.. .
    > "Sam" <samj@austarmetro.com.au> wrote in
    > news:3f64b27b@news.comindico.com.au:
    >
    > >
    > > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > > news:Cj_8b.11126$NX3.9947@nwrddc01.gnilink.net...
    > >> Sam wrote:
    > >> > when I run the code below I get
    > >> > readline() on closed filehandle DATA at practice.plx line 6.
    > >> >
    > >> > use warnings;
    > >> > use strict;
    > >> > open DATA, 'home/username/data/avg' || die $!;
    >
    > <snip>
    >
    > >> If you change this to
    > >> open DATA, 'home/username/data/avg' or die $!;
    > >> then probably you will get a runtime error "File does not exist"
    > >> which points to the second problem:
    > >> I'm guessing but probably you meant to open
    > >> '/home/username/data/avg', not just 'home/username/data/avg'.
    >
    > <snip>
    > >
    > > #!/usr/bin/perl
    > > use warnings;
    > > use strict;
    > >
    > > my $file = "home/user/data/avg";
    > > open DATA, $file or die $!;
    > > while (<DATA>) {
    > > print $_;
    > > }
    > >
    > > when I run it I get
    > > No such file or directory at practice.plx line 6.
    >
    > You don't really read the responses apparently. Please read what Jurgen
    > pointed out as the second problem with the open call, and see if fixing
    > that solves your issue.
    >
    > Sinan.
    >
    > --
    > A. Sinan Unur
    > [email]asu1@c-o-r-n-e-l-l.edu[/email]
    > Remove dashes for address
    > Spam bait: mailto:uce@ftc.gov
    yes I did read all the posts, sorry that I didn't give that impression

    [Quote]*************************************
    There are two problems in this one line:
    Due to precedence rules it will be evaluated as
    open DATA, ('home/username/data/avg' || die $!);

    If you change this to
    open DATA, 'home/username/data/avg' or die $!;
    then probably you will get a runtime error "File does not exist" which
    points to the second problem:
    I'm guessing but probably you meant to open '/home/username/data/avg', not
    just 'home/username/data/avg'.
    ********************************************

    the suggestion to use the 'or' instead '||' has been tried for no avail, but
    knowing the || has a precedence over 'or' so I used 'or' with my second
    version of the program (open DATA, $file or die $!;)

    the second suggestion 'guess' states (open '/home/username/data/avg'), well
    where is the file handler DATA so I didn't understand how to implement that
    solution.

    thanks



    Sam Guest

  10. #9

    Default Re: closed filehandle

    "Sam" <samj@austarmetro.com.au> wrote in
    news:3f64d3da@news.comindico.com.au:
    [quote]
    >
    > "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote in message
    > news:Xns93F6A46C9676Easu1cornelledu@132.236.56.8.. .
    >> "Sam" <samj@austarmetro.com.au> wrote in
    >> news:3f64b27b@news.comindico.com.au:
    >>
    >> >
    >> > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    >> > news:Cj_8b.11126$NX3.9947@nwrddc01.gnilink.net...
    >> >> Sam wrote:
    >> >> > when I run the code below I get
    >> >> > readline() on closed filehandle DATA at practice.plx line 6.
    >> >> >
    >> >> > use warnings;
    >> >> > use strict;
    >> >> > open DATA, 'home/username/data/avg' || die $!;
    >>
    >> <snip>
    >>
    >> >> If you change this to
    >> >> open DATA, 'home/username/data/avg' or die $!;
    >> >> then probably you will get a runtime error "File does not exist"
    >> >> which points to the second problem:
    >> >> I'm guessing but probably you meant to open
    >> >> '/home/username/data/avg', not just 'home/username/data/avg'.
    >>
    >> <snip>
    >> >
    >> > #!/usr/bin/perl
    >> > use warnings;
    >> > use strict;
    >> >
    >> > my $file = "home/user/data/avg";
    >> > open DATA, $file or die $!;
    >> > while (<DATA>) {
    >> > print $_;
    >> > }
    >> >
    >> > when I run it I get
    >> > No such file or directory at practice.plx line 6.
    >>
    >> You don't really read the responses apparently. Please read what
    >> Jurgen pointed out as the second problem with the open call, and see
    >> if fixing that solves your issue.
    >>
    >> Sinan.
    >
    > yes I did read all the posts, sorry that I didn't give that impression
    >
    >
    *************************************
    > There are two problems in this one line:
    > Due to precedence rules it will be evaluated as
    > open DATA, ('home/username/data/avg' || die $!);
    >
    > If you change this to
    > open DATA, 'home/username/data/avg' or die $!;
    > then probably you will get a runtime error "File does not exist" which
    > points to the second problem:
    > I'm guessing but probably you meant to open '/home/username/data/avg',
    > not just 'home/username/data/avg'.
    > ********************************************
    >
    > the suggestion to use the 'or' instead '||' has been tried for no
    > avail, but knowing the || has a precedence over 'or' so I used 'or'
    > with my second version of the program (open DATA, $file or die $!;)
    >
    > the second suggestion 'guess' states (open '/home/username/data/avg'),
    > well where is the file handler DATA so I didn't understand how to
    > implement that solution.
    OK, maybe this is an English problem (on your part).

    <quote author="Jurgen">
    > I'm guessing but probably you meant to open '/home/username/data/avg',
    > not just 'home/username/data/avg'.
    </quote>

    That is an English sentence, not a Perl statement (notice the 'you meant
    to open' part).

    #!/usr/bin/perl

    use warnings;
    use strict;

    # BTW, where is the actual file located?
    open(DATA, '/home/user/data/avg') || die $!;
    while (<DATA>) {
    print;
    }


    --
    A. Sinan Unur
    [email]asu1@c-o-r-n-e-l-l.edu[/email]
    Remove dashes for address
    Spam bait: mailto:uce@ftc.gov
    A. Sinan Unur Guest

  11. #10

    Default Re: closed filehandle

    Sam wrote:
    > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > news:Cj_8b.11126$NX3.9947@nwrddc01.gnilink.net...
    >> Sam wrote:
    >>> when I run the code below I get
    >>> readline() on closed filehandle DATA at practice.plx line 6.
    >>>
    >>> use warnings;
    >>> use strict;
    >>> open DATA, 'home/username/data/avg' || die $!;
    >>
    >> There are two problems in this one line:
    >> Due to precedence rules it will be evaluated as
    >> open DATA, ('home/username/data/avg' || die $!);
    >>
    >> If you change this to
    >> open DATA, 'home/username/data/avg' or die $!;
    >> then probably you will get a runtime error "File does not exist"
    >> which points to the second problem:
    >> I'm guessing but probably you meant to open
    >> '/home/username/data/avg', not just 'home/username/data/avg'.
    >>
    >>> while (<DATA>) {
    >>> print $_;
    >>> }
    >>
    >>
    >
    > #!/usr/bin/perl
    > use warnings;
    > use strict;
    >
    > my $file = "home/user/data/avg";
    > open DATA, $file or die $!;
    > while (<DATA>) {
    > print $_;
    > }
    >
    > when I run it I get
    > No such file or directory at practice.plx line 6.
    Well, yes. Exactly as I predicted.
    Does that surprise you in any way? Did you actually read the second part of
    my reply?

    jue


    Jürgen Exner Guest

  12. #11

    Default Re: closed filehandle


    "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote in message
    news:Xns93F6B553F2AD2asu1cornelledu@132.236.56.8.. .[quote]
    > "Sam" <samj@austarmetro.com.au> wrote in
    > news:3f64d3da@news.comindico.com.au:
    >
    > >
    > > "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote in message
    > > news:Xns93F6A46C9676Easu1cornelledu@132.236.56.8.. .
    > >> "Sam" <samj@austarmetro.com.au> wrote in
    > >> news:3f64b27b@news.comindico.com.au:
    > >>
    > >> >
    > >> > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > >> > news:Cj_8b.11126$NX3.9947@nwrddc01.gnilink.net...
    > >> >> Sam wrote:
    > >> >> > when I run the code below I get
    > >> >> > readline() on closed filehandle DATA at practice.plx line 6.
    > >> >> >
    > >> >> > use warnings;
    > >> >> > use strict;
    > >> >> > open DATA, 'home/username/data/avg' || die $!;
    > >>
    > >> <snip>
    > >>
    > >> >> If you change this to
    > >> >> open DATA, 'home/username/data/avg' or die $!;
    > >> >> then probably you will get a runtime error "File does not exist"
    > >> >> which points to the second problem:
    > >> >> I'm guessing but probably you meant to open
    > >> >> '/home/username/data/avg', not just 'home/username/data/avg'.
    > >>
    > >> <snip>
    > >> >
    > >> > #!/usr/bin/perl
    > >> > use warnings;
    > >> > use strict;
    > >> >
    > >> > my $file = "home/user/data/avg";
    > >> > open DATA, $file or die $!;
    > >> > while (<DATA>) {
    > >> > print $_;
    > >> > }
    > >> >
    > >> > when I run it I get
    > >> > No such file or directory at practice.plx line 6.
    > >>
    > >> You don't really read the responses apparently. Please read what
    > >> Jurgen pointed out as the second problem with the open call, and see
    > >> if fixing that solves your issue.
    > >>
    > >> Sinan.
    > >
    > > yes I did read all the posts, sorry that I didn't give that impression
    > >
    > >
    *************************************
    > > There are two problems in this one line:
    > > Due to precedence rules it will be evaluated as
    > > open DATA, ('home/username/data/avg' || die $!);
    > >
    > > If you change this to
    > > open DATA, 'home/username/data/avg' or die $!;
    > > then probably you will get a runtime error "File does not exist" which
    > > points to the second problem:
    > > I'm guessing but probably you meant to open '/home/username/data/avg',
    > > not just 'home/username/data/avg'.
    > > ********************************************
    > >
    > > the suggestion to use the 'or' instead '||' has been tried for no
    > > avail, but knowing the || has a precedence over 'or' so I used 'or'
    > > with my second version of the program (open DATA, $file or die $!;)
    > >
    > > the second suggestion 'guess' states (open '/home/username/data/avg'),
    > > well where is the file handler DATA so I didn't understand how to
    > > implement that solution.
    >
    > OK, maybe this is an English problem (on your part).
    >
    > <quote author="Jurgen">
    > > I'm guessing but probably you meant to open '/home/username/data/avg',
    > > not just 'home/username/data/avg'.
    > </quote>
    >
    > That is an English sentence, not a Perl statement (notice the 'you meant
    > to open' part).
    >
    > #!/usr/bin/perl
    >
    > use warnings;
    > use strict;
    >
    > # BTW, where is the actual file located?
    > open(DATA, '/home/user/data/avg') || die $!;
    > while (<DATA>) {
    > print;
    > }
    >
    >
    > --
    > A. Sinan Unur
    > [email]asu1@c-o-r-n-e-l-l.edu[/email]
    > Remove dashes for address
    > Spam bait: mailto:uce@ftc.gov
    the file name is avg and it is located at /home/<username>/data directory


    Sam Guest

  13. #12

    Default Re: closed filehandle

    Sam wrote:
    > the file name is avg and it is located at /home/<username>/data
    > directory
    Then why are you trying to open
    home/user/data/avg
    instead of
    /home/user/data/avg

    Or did you make sure that your CWD is the root directory?
    At least I didn't see any code for that anywhere in your previous code
    samples.

    jue


    Jürgen Exner Guest

  14. #13

    Default Re: closed filehandle


    "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    news:tcc9b.9890$1D5.4139@nwrddc02.gnilink.net...
    > Sam wrote:
    > > the file name is avg and it is located at /home/<username>/data
    > > directory
    >
    > Then why are you trying to open
    > home/user/data/avg
    > instead of
    > /home/user/data/avg
    >
    > Or did you make sure that your CWD is the root directory?
    > At least I didn't see any code for that anywhere in your previous code
    > samples.
    >
    > jue
    >
    >
    I really need help to understand this. as I have been reading, you need a
    file handler (DATA) attach to it the file name and pass that to the sub open
    inorder to read the file's line by line in the variable $_. what I am
    missing?


    Sam Guest

  15. #14

    Default Re: closed filehandle


    "Sam" <samj@austarmetro.com.au> wrote in message
    news:3f6568df$1@news.comindico.com.au...
    >
    > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > news:tcc9b.9890$1D5.4139@nwrddc02.gnilink.net...
    > > Sam wrote:
    > > > the file name is avg and it is located at /home/<username>/data
    > > > directory
    > >
    > > Then why are you trying to open
    > > home/user/data/avg
    > > instead of
    > > /home/user/data/avg
    > >
    > > Or did you make sure that your CWD is the root directory?
    > > At least I didn't see any code for that anywhere in your previous code
    > > samples.
    > >
    > > jue
    > >
    > >
    >
    > I really need help to understand this. as I have been reading, you need a
    > file handler (DATA) attach to it the file name and pass that to the sub
    open
    > inorder to read the file's line by line in the variable $_. what I am
    > missing?
    The correct path to the file.


    Tintin Guest

  16. #15

    Default Re: closed filehandle

    Tintin <me@privacy.net> wrote in comp.lang.perl.misc:
    >
    > "Sam" <samj@austarmetro.com.au> wrote in message
    > news:3f6568df$1@news.comindico.com.au...
    > >
    > > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > > news:tcc9b.9890$1D5.4139@nwrddc02.gnilink.net...
    > > > Sam wrote:
    > > > > the file name is avg and it is located at /home/<username>/data
    > > > > directory
    > > >
    > > > Then why are you trying to open
    > > > home/user/data/avg
    > > > instead of
    > > > /home/user/data/avg
    > > >
    > > > Or did you make sure that your CWD is the root directory?
    > > > At least I didn't see any code for that anywhere in your previous code
    > > > samples.
    > > >
    > > > jue
    > > >
    > > >
    > >
    > > I really need help to understand this. as I have been reading, you need a
    > > file handler (DATA) attach to it the file name and pass that to the sub
    > open
    > > inorder to read the file's line by line in the variable $_. what I am
    > > missing?
    >
    > The correct path to the file.
    The poster is missing a lot more than that. Let's look at his last
    sentence:

    "... you need a file handler (DATA)"

    The term is "filehandle", not "file handler"

    "attach to it the file name and pass that to the sub open"

    The attachment doesn't happen before you pass it to "open", it's the
    call to "open" that does the attachment. And "open" isn't a sub, it
    is a built-in function.

    "inorder to read the file's line by line in the variable $_."

    The file's what?

    The reading you do doesn't happen in "open". Whether you read it
    line-by-line or any other way, and whether you read it in the variable
    $_ or another variable is determined later.

    This is how the sentence might have read:

    "... you need a filehandle (DATA) which you attach to the file name
    by passing both to "open" in order to read the files content in any
    way you please."

    Anno
    Anno Siegel Guest

  17. #16

    Default Re: closed filehandle

    Sam wrote:
    > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > news:tcc9b.9890$1D5.4139@nwrddc02.gnilink.net...
    >> Sam wrote:
    >>> the file name is avg and it is located at /home/<username>/data
    >>> directory
    >>
    >> Then why are you trying to open
    >> home/user/data/avg
    >> instead of
    >> /home/user/data/avg
    >>
    >> Or did you make sure that your CWD is the root directory?
    >> At least I didn't see any code for that anywhere in your previous
    >> code samples.
    >
    > I really need help to understand this. as I have been reading, you
    > need a file handler (DATA) attach to it the file name and pass that
    > to the sub open inorder to read the file's line by line in the
    > variable $_. what I am missing?
    You are missing the bloody leading slash in your file name!
    If (for the sake of argument) your current working directory is
    /my/own/directory then you are trying to open
    /my/own/directory/home/user/data/avg which of course doesn't exist (or if it
    exists by chance then it would not be the file that you want).

    And yes, of course open() takes another argument which is a file handle (not
    a handler!), but that has nothing to do with your problem.

    jue


    Jürgen Exner Guest

  18. #17

    Default Re: closed filehandle


    "Tintin" <me@privacy.net> wrote in message
    news:bk3u2l$n3ch2$1@ID-172104.news.uni-berlin.de...
    >
    > "Sam" <samj@austarmetro.com.au> wrote in message
    > news:3f6568df$1@news.comindico.com.au...
    > >
    > > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > > news:tcc9b.9890$1D5.4139@nwrddc02.gnilink.net...
    > > > Sam wrote:
    > > > > the file name is avg and it is located at /home/<username>/data
    > > > > directory
    > > >
    > > > Then why are you trying to open
    > > > home/user/data/avg
    > > > instead of
    > > > /home/user/data/avg
    > > >
    > > > Or did you make sure that your CWD is the root directory?
    > > > At least I didn't see any code for that anywhere in your previous code
    > > > samples.
    > > >
    > > > jue
    > > >
    > > >
    > >
    > > I really need help to understand this. as I have been reading, you need
    a
    > > file handler (DATA) attach to it the file name and pass that to the sub
    > open
    > > inorder to read the file's line by line in the variable $_. what I am
    > > missing?
    >
    > The correct path to the file.
    >
    >
    how do I work out that correct path to this file?
    I tried
    /home/user/data/avg
    home/user/data/avg
    /data/avg
    data/avg
    I am logged in as usr$


    Sam Guest

  19. #18

    Default Re: closed filehandle

    >> On Mon, 15 Sep 2003 16:30:51 GMT,
    >> "Sam" <samj@austarmetro.com.au> said:
    > "Tintin" <me@privacy.net> wrote in message
    >> The correct path to the file.
    >>
    > how do I work out that correct path to this file? I
    > tried /home/user/data/avg home/user/data/avg /data/avg
    > data/avg I am logged in as usr$
    Only you can know where the file is on your system. Go
    into the directory where the file lives and do "pwd".

    If you don't know where the file is, how do you expect to
    be able to write a program to open it?
    Tony Curtis Guest

  20. #19

    Default Re: closed filehandle


    "Tony Curtis" <tony_curtis32@yahoo.com> wrote in message
    news:87ad96nh4p.fsf@limey.hpcc.uh.edu...
    > >> On Mon, 15 Sep 2003 16:30:51 GMT,
    > >> "Sam" <samj@austarmetro.com.au> said:
    >
    > > "Tintin" <me@privacy.net> wrote in message
    >
    > >> The correct path to the file.
    > >>
    > > how do I work out that correct path to this file? I
    > > tried /home/user/data/avg home/user/data/avg /data/avg
    > > data/avg I am logged in as usr$
    >
    > Only you can know where the file is on your system. Go
    > into the directory where the file lives and do "pwd".
    >
    > If you don't know where the file is, how do you expect to
    > be able to write a program to open it?
    boxname:/home/username/data# ls
    avg
    boxname:/home/username/data# pwd
    /home/username/data
    boxname:/home/username/data#

    it is working now, for a reason I still don't understand why. it must be
    something with the xemacs set-up. for the fact the file name change from
    xxx.plx to xxx.pl
    I am puzzled.


    Sam Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139