#!/usr/bin/perl use strict; package myNull; sub TIEHANDLE { my $class = shift; my $fh = local *FH; bless \$fh, $class; } sub SEEK { my $class = shift; my $offset = shift; my $whence = shift; print "SEEK: offset = $offset\n"; } 1; perl -e 'use myNull; tie *null, "myNull"; seek null, 5.5, 0;' SEEK: offset = 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interesting SEEK behavior on tied filehandle (others)
by tye (Sage) on Aug 02, 2006 at 20:13 UTC | |
by ikegami (Patriarch) on Aug 02, 2006 at 20:29 UTC | |
|
Re: Interesting SEEK behavior on tied filehandle
by runrig (Abbot) on Aug 02, 2006 at 19:20 UTC | |
|
Re: Interesting SEEK behavior on tied filehandle
by Fletch (Bishop) on Aug 02, 2006 at 19:11 UTC |