Using gcc-3.0 (tested with 3.0.4) now works out of the box, as do
recent gcc-2.9 builds available directly from IBM as part of their Linux
compatibility packages, available here:
-
+
http://www.ibm.com/servers/aix/products/aixos/linux/
=head2 Using Large Files with Perl
Inplace editing ( perl -i ) of files doesn't work without doing a backup
of the file being edited ( perl -i.bak ).
-
+
=back
=head1 INSTALL PERL ON CYGWIN
Jperl ¸ß´¹¥¹¥¯¥ê¥×¥È
¤¤¤ï¤æ¤ë"shebang"¤òÊѹ¹¤¹¤ë¤À¤±¤Ç¡¢JperlÍѤÎscript¤Î¤Û¤È¤ó¤É¤ÏÊѹ¹¤Ê¤·¤ËÍøÍѲÄǽ¤À¤È»×¤ï¤ì¤Þ¤¹¡£
-
+
#!/path/to/jperl
¢
#!/path/to/perl -Mencoding=euc-jp
-
+
¾Ü¤·¤¯¤Ï perldoc encoding ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
=back
Home for Korean Perlmanias
=item L<http://www.oreilly.co.kr/perl/>
-
+
O'Reilly¿¡¼ ³ª¿Â Çѱ¹¾î Perl ¼Àû ¸ñ·Ï
=item L<http://www.perlschool.net/>
Çѱ¹¾î ¹®ÀÚ ÁýÇÕ ¹× ÀÎÄÚµù¿¡ ´ëÇÑ ¾È³».
-=item L<htp://www.cl.cam.ac.uk/~mgk25/unicode.html>
+=item L<http://www.cl.cam.ac.uk/~mgk25/unicode.html>
À¯´Ð½º/¸®´ª½º¿¡¼ À¯´ÏÄÚµå¿Í UTF-8 »ç¿ë¿¡ ´ëÇÑ ¹®´äÁý(FAQ)
README.macos - Perl under Mac OS (Classic)
-
=head1 SYNOPSIS
This document briefly describes perl under Mac OS (Classic).
Unix/Linux ¤Wªº UTF-8 ¤Î Unicode µª«È°Ý
+=back
+
=head2 ¤¤¤å¤Æ¸ê°T
+=over 4
+
=item ¬°¤°»ò¥s "¥¿Å餤¤å" ¤£¥s "ÁcÅ餤¤å"?
L<http://www.csie.ntu.edu.tw/~b7506051/mozilla/faq.html#faqglossary>
=over
-=item
+=item *
64-bit builds
Note that 64-bit support is still experimental.
-=item
+=item *
Failure of Thread tests
not new failures--Perl 5.005_0x has the same bugs, but didn't have these
tests. (Note that support for 5.005-style threading remains experimental.)
-=item
+=item *
NEXTSTEP 3.3 POSIX test failure
a month starting from zero, which, while being logical to programmers,
will cause the subtests 19 to 27 of the lib/posix test may fail.
-=item
+=item *
Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc
# Nothing has set the FOO element so far
{ local $tied_hash{FOO} = 'Bar' }
-
+
# This used to print, but not now.
print "exists!\n" if exists $tied_hash{FOO};
optimized for speed on some operations, and for at least some
programmers the notation might be familiar.
-=item B<How do I convert hexadecimal into decimal:>
+=over 4
+
+=item How do I convert hexadecimal into decimal
Using perl's built in conversion of 0x notation:
$vec = Bit::Vector->new_Hex(32, "DEADBEEF");
$dec = $vec->to_Dec();
-=item B<How do I convert from decimal to hexadecimal:>
+=item How do I convert from decimal to hexadecimal
Using sprint:
$vec->Resize(32); # suppress leading 0 if unwanted
$hex = $vec->to_Hex();
-=item B<How do I convert from octal to decimal:>
+=item How do I convert from octal to decimal
Using Perl's built in conversion of numbers with leading zeros:
$vec->Chunk_List_Store(3, split(//, reverse "33653337357"));
$dec = $vec->to_Dec();
-=item B<How do I convert from decimal to octal:>
+=item How do I convert from decimal to octal
Using sprintf:
$vec = Bit::Vector->new_Dec(32, -559038737);
$oct = reverse join('', $vec->Chunk_List_Read(3));
-=item B<How do I convert from binary to decimal:>
+=item How do I convert from binary to decimal
Perl 5.6 lets you write binary numbers directly with
the 0b notation:
$vec = Bit::Vector->new_Bin(32, "11011110101011011011111011101111");
$dec = $vec->to_Dec();
-=item B<How do I convert from decimal to binary:>
+=item How do I convert from decimal to binary
Using unpack;
The remaining transformations (e.g. hex -> oct, bin -> hex, etc.)
are left as an exercise to the inclined reader.
+=back
=head2 Why doesn't & work the way I want it to?
for $orbit ( values %orbits ) {
($orbit **= 3) *= (4/3) * 3.14159;
}
-
+
Prior to perl 5.6 C<values> returned copies of the values,
so older perl code often contains constructions such as
C<@orbits{keys %orbits}> instead of C<values %orbits> where
the hash is to be modified.
-
+
=head2 How do I select a random element from an array?
Use the rand() function (see L<perlfunc/rand>):
Some idioms can handle this in a single statement:
select((select(OUTPUT_HANDLE), $| = 1)[0]);
-
+
$| = 1, select $_ for select OUTPUT_HANDLE;
Some modules offer object-oriented access to handles and their
and use them in the place of named handles.
open my $fh, $file_name;
-
+
open local $fh, $file_name;
-
+
print $fh "Hello World!\n";
-
+
process_file( $fh );
Before perl5.6, you had to deal with various typeglob idioms
open FILE, "> $filename";
process_typeglob( *FILE );
process_reference( \*FILE );
-
+
sub process_typeglob { local *FH = shift; print FH "Typeglob!" }
sub process_reference { local $fh = shift; print $fh "Reference!" }
#!/usr/bin/perl
open my $oldout, ">&STDOUT" or die "Can't dup STDOUT: $!";
open OLDERR, ">&", \*STDERR or die "Can't dup STDERR: $!";
-
+
open STDOUT, '>', "foo.out" or die "Can't redirect STDOUT: $!";
open STDERR, ">&STDOUT" or die "Can't dup STDOUT: $!";
http://bugs.perl.org/perlbug.cgi?req=spec
-
-B<The interfaces:>
-
-
=item 1 http://bugs.perl.org
Login via the web, (remove B<admin/> if only browsing), where interested Cc's, tests, patches and change-ids, etc. may be assigned.
look like a loop as the operating system will re-issue the signal as
there are un-waited-for completed child processes.
-=back 4
+=back
=head1 Using open() for IPC
# set_arr_lv cannot stop this !
set_arr_lv() = { a => 1 };
-
+
=back
=head2 Passing Symbol Table Entries (typeglobs)
this. yield() is pretty straightforward, and works like this:
use threads;
-
+
sub loop {
my $thread = shift;
my $foo = 50;
my $thread1 = threads->new(\&loop, 'first');
my $thread2 = threads->new(\&loop, 'second');
my $thread3 = threads->new(\&loop, 'third');
-
+
It is important to remember that yield() is only a hint to give up the CPU,
it depends on your hardware, OS and threading libraries what actually happens.
Therefore it is important to note that one should not build the scheduling of
my $foo : shared = 1;
my $bar = 1;
threads->new(sub { $foo++; $bar++ })->join;
-
+
print "$foo\n"; #prints 2 since $foo is shared
print "$bar\n"; #prints 1 since $bar is not shared
which will match assigned characters known to be part of the Greek script.
-[b] See L</User-defined Character Properties>.
+[b] See L</"User-Defined Character Properties">.
=item *
=over 4
-=item
+=item *
Will My Old Scripts Break?
to C<chr(45)> or "-" (in ASCII), now it is LATIN CAPITAL LETTER I WITH
BREVE.
-=item
+=item *
How Do I Make My Scripts Work With Unicode?
generate Unicode data. The most important thing is getting input as
Unicode; for that, see the earlier I/O discussion.
-=item
+=item *
How Do I Know Whether My String Is In Unicode?
print length($unicode), "\n"; # will also print 2
# (the 0xC4 0x80 of the UTF-8)
-=item
+=item *
How Do I Detect Data That's Not Valid In a Particular Encoding?
Unicode". Without that the C<unpack("U*", ...)> would accept also
data like C<chr(0xFF>), similarly to the C<pack> as we saw earlier.
-=item
+=item *
How Do I Convert Binary Data Into a Particular Encoding, Or Vice Versa?
use C<unpack("C*", $string)> for the former, and you can create
well-formed Unicode data by C<pack("U*", 0xff, ...)>.
-=item
+=item *
How Do I Display Unicode? How Do I Input Unicode?
See http://www.alanwood.net/unicode/ and
http://www.cl.cam.ac.uk/~mgk25/unicode.html
-=item
+=item *
How Does Unicode Work With Traditional Locales?