diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1991-01-11 05:47:59 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1991-01-11 05:47:59 +0000 |
commit | 7e1cf235bd6c3a4fbf1093f84db8002929b8b6c6 (patch) | |
tree | b40f89bf7894e94dab7bb84fc004eb03bd4b904a /lib/ctime.pl | |
parent | 4e8eb4f0f838674cc353c6a5ff3e06ff40cd5ea9 (diff) | |
download | perl-7e1cf235bd6c3a4fbf1093f84db8002929b8b6c6.tar.gz |
perl 3.0 patch #42 (combined patch)
Most of these patches are pretty self-explanatory. Much of this
is random cleanup in preparation for version 4.0, so I won't talk
about it here. A couple of things should be noted, however.
First, there's a new -0 option that allows you to specify (in octal)
the initial value of $/, the record separator. It's primarily
intended for use with versions of find that support -print0 to
delimit filenames with nulls, but it's more general than that:
null
^A
default
CR
paragraph mode
file slurp mode
This feature is so new that it didn't even make it into the book.
The other major item is that different patchlevels of perl can
now coexist in your bin directory. The names "perl" and "taintperl"
are just links to "perl3.044" and "tperl3.044". This has several
benefits. The perl3.044 invokes the corresponding tperl3.044 rather
than taintperl, so it always runs the correct version. Second, you can
"freeze" a script by putting a #! line referring to a version that
it is known to work with. Third, you can put a new version out
there to try out before making it the default perl. Lastly, it
sells more disk drives. :-)
Barring catastrophe, this will likely be the last patch before
version 4.0 comes out.
Diffstat (limited to 'lib/ctime.pl')
-rw-r--r-- | lib/ctime.pl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ctime.pl b/lib/ctime.pl index f910db757d..fe6ef51538 100644 --- a/lib/ctime.pl +++ b/lib/ctime.pl @@ -12,11 +12,17 @@ ;# #include <ctime.pl> # see the -P and -I option in perl.man ;# $Date = &ctime(time); -@DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); -@MoY = ('Jan','Feb','Mar','Apr','May','Jun', - 'Jul','Aug','Sep','Oct','Nov','Dec'); +CONFIG: { + package ctime; + + @DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); + @MoY = ('Jan','Feb','Mar','Apr','May','Jun', + 'Jul','Aug','Sep','Oct','Nov','Dec'); +} sub ctime { + package ctime; + local($time) = @_; local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); |