Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ops(3perl) [debian man page]

ops(3perl)						 Perl Programmers Reference Guide						ops(3perl)

NAME
ops - Perl pragma to restrict unsafe operations when compiling SYNOPSIS
perl -Mops=:default ... # only allow reasonably safe operations perl -M-ops=system ... # disable the 'system' opcode DESCRIPTION
Since the "ops" pragma currently has an irreversible global effect, it is only of significant practical use with the "-M" option on the command line. See the Opcode module for information about opcodes, optags, opmasks and important information about safety. SEE ALSO
Opcode, Safe, perlrun perl v5.14.2 2010-12-30 ops(3perl)

Check Out this Related Man Page

bytes(3perl)						 Perl Programmers Reference Guide					      bytes(3perl)

NAME
bytes - Perl pragma to force byte semantics rather than character semantics NOTICE
This pragma reflects early attempts to incorporate Unicode into perl and has since been superseded. It breaks encapsulation (i.e. it exposes the innards of how the perl executable currently happens to store a string), and use of this module for anything other than debugging purposes is strongly discouraged. If you feel that the functions here within might be useful for your application, this possibly indicates a mismatch between your mental model of Perl Unicode and the current reality. In that case, you may wish to read some of the perl Unicode documentation: perluniintro, perlunitut, perlunifaq and perlunicode. SYNOPSIS
use bytes; ... chr(...); # or bytes::chr ... index(...); # or bytes::index ... length(...); # or bytes::length ... ord(...); # or bytes::ord ... rindex(...); # or bytes::rindex ... substr(...); # or bytes::substr no bytes; DESCRIPTION
The "use bytes" pragma disables character semantics for the rest of the lexical scope in which it appears. "no bytes" can be used to reverse the effect of "use bytes" within the current lexical scope. Perl normally assumes character semantics in the presence of character data (i.e. data that has come from a source that has been marked as being of a particular character encoding). When "use bytes" is in effect, the encoding is temporarily ignored, and each string is treated as a series of bytes. As an example, when Perl sees "$x = chr(400)", it encodes the character in UTF-8 and stores it in $x. Then it is marked as character data, so, for instance, "length $x" returns 1. However, in the scope of the "bytes" pragma, $x is treated as a series of bytes - the bytes that make up the UTF8 encoding - and "length $x" returns 2: $x = chr(400); print "Length is ", length $x, " "; # "Length is 1" printf "Contents are %vd ", $x; # "Contents are 400" { use bytes; # or "require bytes; bytes::length()" print "Length is ", length $x, " "; # "Length is 2" printf "Contents are %vd ", $x; # "Contents are 198.144" } chr(), ord(), substr(), index() and rindex() behave similarly. For more on the implications and differences between character semantics and byte semantics, see perluniintro and perlunicode. LIMITATIONS
bytes::substr() does not work as an lvalue(). SEE ALSO
perluniintro, perlunicode, utf8 perl v5.14.2 2010-12-30 bytes(3perl)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

loops in loops

ok, i tried to write a script called purge.sh which searches current process' for a specified user running a process with a specified keyword. it also prompts the user to see how many times to purge for the specified process and how many different processes they wish to do this to.it worked until... (11 Replies)
Discussion started by: Blip
11 Replies

2. What is on Your Mind?

*nix Desktops

Yeah, we all know where to find screenshots of Unix and Linux, but it would be awesome to see some of your *nix screenshots. Okay.. to explain: This is my KDE desktop on Yellow Dog Linux. I changed the background recently to a Commodore 64 theme (pretty cool) and no longer is the Konstruct Konsole... (25 Replies)
Discussion started by: gnerd
25 Replies

3. Shell Programming and Scripting

running a looping script for all files in directory

I have three different linux command scripts that I run for 20+ files in one directory. it goes like this FIRST SCRIPT: grep 'something' -w file > newfile1 . . . grep 'something -w file > newfile20 then I take all these 'newfileN' and run this: awk 'BEGIN {... (20 Replies)
Discussion started by: labrazil
20 Replies

4. Shell Programming and Scripting

problem developing for or while loops with the cut command

I have been working on a script all day and am having very little success. Essentially, I am reading a file and trying to format the data in the file. I am currently trying to put the data into three separate files, so that I can paste them back together into a single output file. Trying to... (16 Replies)
Discussion started by: synergy_texas
16 Replies

5. Shell Programming and Scripting

How to select the *.txt files using Loops

Hi, I need to select the txt files from one folder and pass this filename as parameter and the loop should discontinue after all the files are selected and the iteration should continue only once.. Viz., i have files like abc_2005_f1.txt, abc_2006_f1.txt, abc_2007_f1.txt... in /data... (11 Replies)
Discussion started by: kumar16
11 Replies

6. Shell Programming and Scripting

problem with floating point number loops

Hey, I guess I am just to stupid and am not seeing the "wood for the trees", but I am always getting strange errors. I want to create a mesh with coordinates like: x y z 3.1 3.0 0.75 0 0 1 3.1 2.9 0.75 0 0 1 3.1 2.8 0.75 0 0 1 3.1 2.7 0.75 0 0 1 3.0 ... (10 Replies)
Discussion started by: ergy1983
10 Replies

7. Solaris

Help with executing multiple remote commands after multiple hops

Hi SSHers, I have embedded this below code in my shell script.. /usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5` SSH to both these servers are public-key authenticated, so things run... (13 Replies)
Discussion started by: LinuxUser2008
13 Replies

8. Solaris

OPS Center Email Notifications

Hi, Does any one know how to configure email notifications (to exchange) in Oracle Enterprise Manager 11g OPS Center? I have gone through the documentation and have done everything it asked, but still no notifications via email. I get the following error: At the OS level i tried sending email... (20 Replies)
Discussion started by: Mack1982
20 Replies

9. Shell Programming and Scripting

Nested for loops

Greetings All, The following script attempts to enumerate all users in all groups in the group file(GROUP) and echo the following information: GROUP ---> USER The script is as follows: IFS="," for GROUP in `ypcat -k group | cut -d" " -f1` do for USER in `ypcat -k group... (13 Replies)
Discussion started by: jacksolm
13 Replies

10. Shell Programming and Scripting

bash loops

hello i'm writing a script and I want to use a for loop inside a while loop as following: while read line; do echo $line for i in $vrm; do echo $i done done < './contacts' when i use just the while loop it prints the lines from file ./contacts just... (13 Replies)
Discussion started by: vlm
13 Replies

11. UNIX for Dummies Questions & Answers

Dealing with Empty files, AWK and Loops

I write this bit of code to calculate the mean and variance for all the files in one directory and print the mean and variance in a separate folder but with the same file name. FILES="data/*" for X in $FILES do name=$(basename $X) awk '{x=$0; s+=$0; n++} END{mean=s/n; for (i in x){ss... (20 Replies)
Discussion started by: A-V
20 Replies

12. Solaris

Ops Center AI wrong IP

Hello, I have problems with Automated Installer on Solaris 11. I tried provision Solaris 11 on my T5-1B server from Ops Center, but AI set wrong IP address for manifest SMF. My Ops Center server has two IP addresses 10.236.102.219 and 10.226.21.141. Second IP is in subnet for provisioning of... (25 Replies)
Discussion started by: olibertu
25 Replies

13. UNIX for Dummies Questions & Answers

Loops & Variable

I am using this code: for e in {1..14} do awk '{gsub(/^.*GGGGGG|TTTTT.*$/,"",$0)} 1' $e.1 > ${e}.2 done However, in the second loop instead of GGGGGG|TTTTT, I should use AAAAAA|CCCCCC. For third loop CCAAAA|CCCCAA, so on and so forth. Is there any way to accomplish this without writing... (20 Replies)
Discussion started by: Xterra
20 Replies

14. Shell Programming and Scripting

2 Loops gathering input

Greetings all, I have came up with some code, to read an input file and generate a list, here is a sample of what I am working with. The variable $USER will be inputted by the person running the utility. do folder=${line%} echo "$folder $USER done < list.txt sample of list.txt- ... (15 Replies)
Discussion started by: jeffs42885
15 Replies

15. Shell Programming and Scripting

Splitting CSV into variables then to XML file

I have a text file that looks like this: FIELD1, FIELD2, THIS IS FIELD3, FIELD4 FIELD1, FIELD2, THIS IS FIELD3, FIELD4 FIELD1, FIELD2, THIS IS FIELD3, FIELD4 I need it to turn it into an XML file to run against a custom application. My ultimate goal is for it to look like... (15 Replies)
Discussion started by: jeffs42885
15 Replies