SEARCH RESULTS

FAQ

How can I set up a footer format to be used with write()?

"How can I write() into a string?" in perlfaq5

, and $~ which shows the line format. ... You end up reimplementing formats when you use them.

"How do I remove HTML from a string?" in perlfaq9

Use HTML::Strip, or HTML::FormatText which not only removes HTML but also attempts to do a little simple ... formatting of the resulting plain text.

"How do I extract selected columns from a string?" in perlfaq4

Use one of the modules that handle that format, such as Text::CSV, Text::CSV_XS, or Text::CSV_PP. ... By using a number after the format specifier, you can denote the column width.

"How can I take a string and turn it into epoch seconds?" in perlfaq4

If it's a regular enough string that it always has the same format, you can split it up and pass the

"How do I modify the shadow password file on a Unix system?" in perlfaq8

To change the file, make a new shadow password file (the format varies from system to system--see passwd

"How do I reformat a paragraph?" in perlfaq4

Formatting files can be easily done by making a shell alias, like so: alias fmt="perl -i -MText:

"How do I find the current century or millennium?" in perlfaq4

systems, the POSIX module's strftime() function has been extended in a non-standard way to use a %C format

"How can I compare two dates and find the difference?" in perlfaq4

date1 - $date2; print "The difference is ", $date_diff->days, " days\n"; If you want to work with formatted

"How do I flush/unbuffer an output filehandle? Why must I do this?" in perlfaq5

NAME perlfaq5 - Files and Formats VERSION version 5.20210411 DESCRIPTION This section deals with ... I/O and the "f" issues: filehandles, flushing, formats, and footers.

"How can I output my numbers with commas added?" in perlfaq5

(contributed by brian d foy and Benjamin Goldberg) You can use Number::Format to separate places in

"How do I find the day or week of the year?" in perlfaq4

my $day_of_year = (localtime)[7]; The POSIX module can also format a date as the day of the year or

"Is there a pretty-printer (formatter) for Perl?" in perlfaq3

The habit of formatting your code as you write it will help prevent bugs.

"How can I manipulate fixed-record-length files?" in perlfaq5

Here is a sample chunk of code to break up and put back together again some fixed-format input lines,

"How do I check a valid mail address?" in perlfaq9

There are two parts: a) How do I verify that an email address is correctly formatted?

"Why isn't my octal data interpreted correctly?" in perlfaq4

Print it in octal and decimal format: printf "0%o %d", $number, $number;

"How can I use a variable as a variable name?" in perlfaq7

This may be because it's something that one can't take a real reference to, such as a format name. ... This doesn't matter for formats, handles, and subroutines, because they are always global--you can't

Functions

format - declare a picture format with use by the write() function

format Declare a picture format for use by the write function. ... For example: format Something = Test: @<<<<<<<< @||||| @>>>>> $str, $%

write - print a picture record

By default the format for a file is the one having the same name as the filehandle, but the format for ... record, the page is advanced by writing a form feed and a special top-of-page format is used to format

printf - output a formatted list to a filehandle

printf FILEHANDLE FORMAT, LIST printf FILEHANDLE printf FORMAT, LIST printf Equivalent to print ... See sprintf for an explanation of the format argument.

formline - internal function used for formats

the format output accumulator, $^A (or $ACCUMULATOR in English). ... You may therefore need to use multiple formlines to implement a single record format, just like the format

sprintf - formatted print into a string

of the format. ... format specification.

pack - convert a list into a binary representation

in native format. ... You can always switch mode mid-format with an explicit C0 or U0 in the format.

unpack - convert binary structure into normal perl variables

The TEMPLATE has the same format as in the pack function. ... the number of set bits in a bit vector: my $setbits = unpack("%32b*", $selectmask); The p and P formats

shift - remove the first element of an array, and return it

If ARRAY is omitted, shifts the @_ array within the lexical scope of subroutines and formats, and the

localtime - convert UNIX time into record or string using local time

use POSIX qw(strftime); my $now_string = strftime "%a %b %e %H:%M:%S %Y", localtime; # or for GMT formatted ... for your locale: my $now_string = strftime "%a %b %e %H:%M:%S %Y", gmtime; C$now_string> will be formatted

getsockopt - get socket options on a given socket

, in which case the result is a packed integer, which you can decode using unpack with the i (or I) format

ref - find out the type of thing being referenced

unblessed referent is not a scalar, then the return value will be one of the strings ARRAY, HASH, CODE, FORMAT

tie - bind a variable to an object class

READLINE this GETC this WRITE this, scalar, length, offset PRINT this, LIST PRINTF this, format

select - reset default output or do I/O multiplexing

For example, to set the top-of-form format for more than one output channel, you might do the following

vec - test or set particular bits in a string

chunks of size BITS/8, and each group is converted to a number as with pack/unpack with big-endian formats ... "b*",$str); $val = unpack("V", $str); write; } } } format

-X - a file test (-r, -x, etc)

filesystem access controls, ACLs (access control lists), read-only filesystems, and unrecognized executable formats

eval - catch exceptions or compile and run code

any outer lexical variables are visible to it, and any package variable settings or subroutine and format

Documentation

Pod::Text - Convert POD data to formatted text

This is the default because it's the expected formatting for manual pages; if you're formatting arbitrary ... nourls Normally, L<> formatting codes with a URL but anchor text are formatted to show both the anchor

perlform - Perl formats

top of form format name is in $^ ($FORMAT_TOP_NAME). ... OUTF "My_Other_Format"; format_top_name OUTF "My_Top_Format"; Much better!

pod2text - Convert POD data to formatted ASCII text

It uses them to generate formatted ASCII text from POD source. ... --nourls Normally, L<> formatting codes with a URL but anchor text are formatted to show both the anchor

perldoc - Look up Perl documentation in Pod format.

NAME perldoc - Look up Perl documentation in Pod format. ... class for the output format that you specify.

Encode::Unicode - Encode::Unicode -- Various Unicode Transformation Formats

NAME Encode::Unicode -- Various Unicode Transformation Formats SYNOPSIS use Encode qw/encode decode ... that are officially documented by Unicode Consortium (except, of course, for UTF-8, which is a native format

Pod::Man - Convert POD data to formatted *roff input

NAME Pod::Man - Convert POD data to formatted *roff input SYNOPSIS use Pod::Man; my $parser = Pod: ... nourls Normally, L<> formatting codes with a URL but anchor text are formatted to show both the anchor

NAME Pod::ParseLink - Parse an L<> formatting code in POD text SYNOPSIS use Pod::ParseLink; my $link ... No attempt is made to resolve formatting codes.

Pod::Text::Overstrike - Convert POD data to formatted overstrike text

NAME Pod::Text::Overstrike - Convert POD data to formatted overstrike text SYNOPSIS use Pod::Text: ... This format was originally designed for hard-copy terminals and/or line printers, yet is readable on

Pod::Text::Termcap - Convert POD data to ASCII text with format escapes

Apart from the format codes, it in all ways functions like Pod::Text. ... If unable to find control strings for bold and underscore formatting, that formatting is skipped, resulting

perlpod - the Plain Old Documentation format

When it gets formatted, it will undergo minimal formatting, like being rewrapped, probably put into a ... =end format =for format text...

perlpodspec - Plain Old Documentation: format specification and notes

formatting codes. ... to be formatted; in that case, formatters will have to just ignore that formatting.

pod2man - Convert POD data to formatted *roff input

If output isn't given, the formatted output is written to STDOUT. ... --nourls Normally, L<> formatting codes with a URL but anchor text are formatted to show both the anchor

Pod::Perldoc - Look up Perl documentation in Pod format.

NAME Pod::Perldoc - Look up Perl documentation in Pod format.

podchecker - check the syntax of POD format documentation files

NAME podchecker - check the syntax of POD format documentation files SYNOPSIS podchecker [-help] [

Pod::Simple::RTF - Pod::Simple::RTF -- format Pod as RTF

NAME Pod::Simple::RTF -- format Pod as RTF SYNOPSIS perl -MPod::Simple::RTF -e \ "exit Pod::Simple ... FORMAT CONTROL ATTRIBUTES You can set these attributes on the parser object before you call parse_file

Pod::Text::Color - Convert POD data to formatted color ASCII text

NAME Pod::Text::Color - Convert POD data to formatted color ASCII text SYNOPSIS use Pod::Text::Color

Pod::Simple::Text - Pod::Simple::Text -- format Pod as plaintext

NAME Pod::Simple::Text -- format Pod as plaintext SYNOPSIS perl -MPod::Simple::Text -e \ "exit Pod

Pod::Simple::XHTML - Pod::Simple::XHTML -- format Pod as validating XHTML

NAME Pod::Simple::XHTML -- format Pod as validating XHTML SYNOPSIS use Pod::Simple::XHTML; my $parser ... Note that the code might be broken into multiple segments if there are nested formatting codes inside

pod2html - convert .pod files to .html files

--poderrors --nopoderrors --css=<URL> --title=<name> DESCRIPTION Converts files from pod format ... (see perlpod) to HTML format.

Pod::Html - module to convert pod files to HTML

files to HTML SYNOPSIS use Pod::Html; pod2html([options]); DESCRIPTION Converts files from pod format ... (see perlpod) to HTML format.

More results found. Refine your search terms or show all documentation results.

Perldeltas

"Formats" in perl5160delta

Formats Several edge cases have been fixed with formats and formline; in particular, where the format ... Assignment to $^A (the format output accumulator) now recalculates the number of lines output.

"format" in perl584delta

format In addition to bug fixes, format's features have been enhanced. See perlform

"Formats" in perl5100delta

Formats Formats were improved in several ways. ... Using @# and ~~ together will now produce a compile-time error, as those format fields are incompatible

"use locale and formats" in perl5140delta

use locale and formats perlform and perllocale have been corrected to state that use locale affects ... formats.

"Version number formats" in perl5120delta

Version number formats Acceptable version number formats have been formalized into "strict" and "lax ... These formats are documented fully in the version module.

"pack() format 'Z' supported" in perl561delta

pack() format 'Z' supported The new format type 'Z' is useful for packing and unpacking null-terminated

"pack() format 'Z' supported" in perl56delta

pack() format 'Z' supported The new format type 'Z' is useful for packing and unpacking null-terminated

"pack() format modifier '!' supported" in perl561delta

pack() format modifier '!' supported The new format type modifier '!'

"pack() format modifier '!' supported" in perl56delta

pack() format modifier '!' supported The new format type modifier '!'

"All printf format conversions are handled internally" in perl5005delta

All printf format conversions are handled internally See "printf" in perlfunc.

"Comma-less variable lists in formats are no longer allowed" in perl5280delta

Comma-less variable lists in formats are no longer allowed Omitting the commas between variables passed ... to formats is no longer allowed.

"IEEE-format Floating Point Default on OpenVMS Alpha" in perl58delta

IEEE-format Floating Point Default on OpenVMS Alpha Perl now uses IEEE format (T_FLOAT) as the default ... internal floating point format on OpenVMS Alpha, potentially breaking binary compatibility with external

"The sprintf %j format size modifier is now available with pre-C99 compilers" in perl5280delta

The sprintf %j format size modifier is now available with pre-C99 compilers The actual size used depends

"perlembed" in perl5280delta

An example in perlembed used the string value of ERRSV as a format string when calling croak(). ... If that string contains format codes such as %s this could crash the program.

"sprintf() fixes" in perl588delta

sprintf() fixes Using the sprintf() function with some formats could lead to a buffer overflow in some ... it was possible for badly written code that did not follow the documentation of Sys::Syslog to have formatting

"Packaging" in perl5280delta

Packaging For the past few years we have released perl using three different archive formats: bzip ( ... decompresses faster, and gzip is more compatible and uses less memory, we have dropped the .bz2 archive format

"New descriptions in perldiag" in perl5140delta

Ambiguous use of -%s resolved as -&%s() Invalid strict version format (%s) Invalid version format (

"Output of PERL_HASH_SEED_DEBUG has been changed" in perl5180delta

Code parsing this output, should it exist, must change to accommodate the new format. ... Example of the new format: $ PERL_HASH_SEED_DEBUG=1 .

"perlguts" in perl5260delta

perlguts Added advice on formatted printing of operands of Size_t and SSize_t

"perlport" in perl5320delta

perlport Update timegm example to use the correct year format 1970 instead of 70. [GH #16431]

More results found. Refine your search terms or show all perldelta results.