Paul - The Programmer

simple & stupid

setup http proxy server for ppm

SET HTTP_proxy=<proxy_server_address:port_number> 

# the prefix http:// is mandatory.

# e.g., SET HTTP_proxy=http://proxy:8080

# following system variables are optional

SET HTTP_proxy_user=<your user name> 

SET HTTP_proxy_pass=<your password> 

Shape the sql*plus output

Command to make the output of sql*plus nicer to read.

set linesize 1500

character cast by Perl -- II

uppercase cast:

perl -p -e '$_=uc'

lowercase cast:

perl -p -e '$_=lc'

character cast by Perl

uppercase cast:

perl -p -e 's/(lowercase pattern)/\u$1/g'

perl -n -e 'print "\U$_"'

perl -p -e '$_="\U$_"'

lowercase cast:

perl -p -e  's/(uppercase pattern)/\l$1/g'

perl -n -e 'print "\L$_"'

perl -p -e '$_="\L$_"'

Perl format string

Strings can be formatted to your liking using formatting characters. Some of these characters also work to format files created in PERL. Think of these characters as miniature functions.

Character Description
\L Transform all letters to lowercase
\l Transform the next letter to lowercase
\U Transform all letters to uppercase
\u Transform the next letter to uppercase
\n Begin on a new line
\r Applys a carriage return
\t Applys a tab to the string
\f Applys a formfedd to the string
\b Backspace
\a Bell
\e Escapes the next character
\0nn Creates Octal formatted numbers
\xnn Creates Hexideciamal formatted numbers
\cX Control characters, x may be any character
\Q Do not match the pattern
\E Ends \U, \L, or \Q functions


print "content-type: text/html \n\n"; #HTTP HEADER

$mystring = "welcome to!"; #String to be formatted
$newline = "welcome to \!";
$capital = "\uwelcome to!";
$ALLCAPS = "\Uwelcome to!";

print $mystring."<br />";
print $newline."<;br />";
print $capital."<br />";
print $ALLCAPS";

Original Link