Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perlio::via::dynamic(3) [osx man page]

dynamic(3)						User Contributed Perl Documentation						dynamic(3)

PerlIO::via::dynamic - dynamic PerlIO layers SYNOPSIS
open $fh, $fname; $p = PerlIO::via::dynamic->new (translate => sub { $_[1] =~ s/$Filename[:ws-./\]*$/$Filename: $fname$/e}, untranslate => sub { $_[1] =~ s/$Filename[:ws-./\]*$/$Filename$/}); $p->via ($fh); binmode $fh, $p->via; # deprecated DESCRIPTION
"PerlIO::via::dynamic" is used for creating dynamic PerlIO layers. It is useful when the behavior or the layer depends on variables. You should not use this module as via layer directly (ie :via(dynamic)). Use the constructor to create new layers, with two arguments: translate and untranslate. Then use "$p-"via ($fh)> to wrap the handle. Once <$fh> is destroyed, the temporary namespace for the IO layer will be removed. Note that PerlIO::via::dynamic uses the scalar fields to reference to the object representing the dynamic namespace. OPTIONS
translate A function that translate buffer upon write. untranslate A function that translate buffer upon read. use_read Use "READ" instead of "FILL" for the layer. Useful when caller expect exact amount of data from read, and the "untranslate" function might return different length. By default "PerlIO::via::dynamic" creates line-based layer to make "translate" implementation easier. AUTHORS
Chia-liang Kao <> COPYRIGHT
Copyright 2004 by Chia-liang Kao <>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <> perl v5.16.2 2008-05-31 dynamic(3)

Check Out this Related Man Page

symlink(3)						User Contributed Perl Documentation						symlink(3)

PerlIO::via::symlink - PerlIO layers for create symlinks SYNOPSIS
open $fh, '>:via(symlink)', $fname; print $fh "link foobar"; close $fh; DESCRIPTION
The PerlIO layer "symlink" allows you to create a symbolic link by writing to the file handle. You need to write C"link $name" to the file handle. If the format does not match, "close" will fail with EINVAL. TEST COVERAGE
----------------------------------- ------ ------ ------ ------ ------ ------ File stmt branch cond sub time total ----------------------------------- ------ ------ ------ ------ ------ ------ blib/lib/PerlIO/via/ 100.0 100.0 n/a 100.0 100.0 100.0 Total 100.0 100.0 n/a 100.0 100.0 100.0 ----------------------------------- ------ ------ ------ ------ ------ ------ AUTHORS
Chia-liang Kao <> COPYRIGHT
Copyright 2004-2005 by Chia-liang Kao <>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <> perl v5.18.2 2005-03-01 symlink(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

translate text (1 position) with sed

Hello, I'm trying to translate a fixed length (the first 6 positions) that begins with a 0 to overwrite the field with an *. Any suggestion? File 1 ------- 013344 01:20 222343 19:30 233333 20:30 File 2 (result) ----------------- ****** 01:20 222343 19:30 233333 20:30 (5 Replies)
Discussion started by: peterk
5 Replies

2. Shell Programming and Scripting

creating a dynamic array in ksh

Hi, Is it possible to create a dynamic array in shell script. I am trying to get the list of logfiles that created that day and put it in a dynamic array. I am not sure about it. help me New to scripting Gundu (3 Replies)
Discussion started by: gundu
3 Replies

3. Shell Programming and Scripting

Perl: Filename expansion?

Hi, I do not know if my subject is right, but I at least have your attention :) Recently I posted a perl question related to this. Now when someone starts my program using an asterics: ./ /orapkg/ora0*/oradata/ It can contain multiple directories. The following command shows... (6 Replies)
Discussion started by: davidg
6 Replies

4. UNIX for Advanced & Expert Users

Count the distinct list of ids

Hello guys, I have a file in the following format(each line seperated by TAB): ========= Filename id Filename id1 Filename id Filename1 id7 Filename1 id7 Filename2 id1 Filename2 id1 Filename2 id3 Filename3 id2 Filename3 id4 Filename3 id4 Filename3 id6 ========= I would like to... (2 Replies)
Discussion started by: jingi1234
2 Replies

5. Shell Programming and Scripting

ksh - adding a dynamic value to the front of a line

Hi Forum, Im trying to write some code to read a file, take a certain dynamic value and write it back to the file at the front of every line. For example, file.txt is: SIMPLE=HELLO CONFIDENTIAL=false SENDER=false REQUIRED=true FEEDBACK=false UPDATE=false REQUIRED=false MAPPING=true... (9 Replies)
Discussion started by: ocelot
9 Replies

6. Shell Programming and Scripting

Reformat Data (Perl)

I am new to Perl. I need to reformat a data file as the last part of a script I am working on. I am stuck on this. Here is the current format: CUSTOMER Filename 09/04/07-08:49 CUSTOMER Filename 09/04/07-08:52 CUSTOMER Filename 09/04/07-08:52 CUSTOMER2 Filename 09/04/07-08:49 CUSTOMER2... (3 Replies)
Discussion started by: flood
3 Replies

7. Shell Programming and Scripting

setting variable value to dynamic sed match - escaping hell

Hello All, I'm trying to write a script that will perform a dynamic match (of a dynamic variable) and set a variable to have the resulting (match) value. The idea is that the environment variable to check ($1) and the regular expression to use ($2) are given as parameters. For example,... (5 Replies)
Discussion started by: aedgar
5 Replies

8. Shell Programming and Scripting

Pipes with the < and >> meanings.

Hey, Well, we're starting scripting next week for my class, and I have my command done, but I don't actually understand what the meaning is, so I was just wondering if someone could "translate" this in to words so that I might be able to do this better... command1 | command2 | command3... (5 Replies)
Discussion started by: sso
5 Replies

9. Shell Programming and Scripting

Retrieving File name

Hi All.. I have a Filename as I want to get the result as... (5 Replies)
Discussion started by: asheshrocky
5 Replies

10. OS X (Apple)

local dynamic http development environment

I have scouted around the last few years and always see that for a individual person to create a dynamic development environment in Mac takes a PHD or something close. Or there are a lot of miss leading info. I would rather work with raw code compared to a wysiwyg editor of any flavor. At this... (5 Replies)
Discussion started by: cowLips
5 Replies

11. Shell Programming and Scripting

Assign output to dynamic variable

Hi Folks, I am trying to assign a value from the command to a dynamic variable. But I am not getting the desired output.. I am sure something is wrong so i need experts advise. There will be multiple files like /var/tmp/server_1, /var/tmp/server_2, /var/tmp/server_3, having different server... (6 Replies)
Discussion started by: ganga.dharan
6 Replies

12. Shell Programming and Scripting

Bash, Dynamic Variable Problem >.<

Hello, I have a problem with a bash script, I've been doing recherches but i can't make it work. It is my first time with a dynamic variable and i don't understand how to write it. #!/bin/bash USER=BARSPIN HOTKEYS_PATH="/home/$USER/Documents/bash/tibia/HOTKEYS" CFG1="A" CFG2="B"... (5 Replies)
Discussion started by: barspin
5 Replies

13. Shell Programming and Scripting

Create, validate and using dynamic variables in Bash scripting

Hi All, I am really struggling to solve this problem, this might be small but I am not able to, can somebody help me? I have few directories and these directories receives text files in large amount with in fraction of seconds. So I just want to send all the files in current directory to... (2 Replies)
Discussion started by: VasuKukkapalli
2 Replies

14. Shell Programming and Scripting

Generating dynamic variables

Hi , i am unable to generate dynamic variables can any one please help me on the below issue j=1 {record_count_"$j"}=`db2 -xselect substr\(job_name,24\) rec_count from $libname.audit_table_nrt where job_name like \'DATAMART_DEL_RUN%\' and STS_FLAG=\'E\' and seq_no=$i` echo " record... (3 Replies)
Discussion started by: bhaskar v
3 Replies

15. Shell Programming and Scripting

Help w/ Reading Matrix & Storing in dynamic array

First of I would just like to state that I am not looking for you guys to just do my work for me, I do want to learn and actually understand everything that is happening. Hey all, I am having trouble on this. What I need to do is... Write an executable C file that will take a text file (not a... (8 Replies)
Discussion started by: innvert
8 Replies

Featured Tech Videos