user-pic

martin

  • About: Blogging about Mathematics, Programming Languages, Open-Source, Privacy, Security, Board Games, Bicycles, Classical Music, and more.
  • Posted Impressions from the German Perl Workshop 2019 to martin

    Another edition of the German Perl Workshop took place in Munich from 6th to 8th March 2019. I very much enjoyed taking part. Let me share some personal remarks.

    Things I learned

  • Posted Installing sets of modules to martin

    In order to quickly install a set of Perl modules for a given task, it is nice to have some kind of meta-package serving no other purpose than pulling in a set of other more specific packages. Traditional ways of doing this with CPAN can be found in the Bundle:: and Task:: namespaces. Recent…

  • Commented on The Math::BigRat Trap
    Other ideas for coping with the problem: Upgrade Math::BigInt & Math::BigRat in the core. This has already been done in perl v5.25.3. Drop Math::BigRat from the core. If you have to fetch it from CPAN, you'll get a recent release....
  • Posted The Math::BigRat Trap to martin

    rat tail

    With the latest stable release of perl, v5.24.0, you could easily get trapped into using a problematic combination of math modules. Here is how, a…

  • Commented on The Fuse Operator - A Suggested Language Extension
    Does Perl 6 have such an operator? Perl 6 uses the symbol ^^ for infix exclusive-or, but has no fuse operator. Interestingly, a single caret is used as a prefix and an infix operator and as a part of many...
  • Commented on UTF-16 and Windows CRLF, oh my
    If you happen to process files originating from a Windows environment somewhere else, that is. In a Windows command line, the first type of quoting is required, of course....
  • Commented on UTF-16 and Windows CRLF, oh my
    Beware of quoting pitfalls in a *nix shell like bash. Within doublequotes, $_ would be interpolated by the shell rather than perl. perl "-M5;binmode($_,':raw:...')for ..." should perhaps better be written as perl '-M5;binmode($_,":raw:...")for ...' in such a command line interpreter....
  • Posted The Fuse Operator - A Suggested Language Extension to martin

    improvements. I would like to discuss yet another "missing" operator. Its purpose is to make expressions handle some edge cases more gracefully. It could render some other extensions that have been suggested before unnecessary. …

Subscribe to feed Recent Actions from martin

  • Yary commented on UTF-16 and Windows CRLF, oh my

    Right and in fact, in Windows cmd shell (the good old DOS-heritage one) no quoting at all is needed around the -M option, since in that shell the $ sign has no special meaning!

    And yes, this tip is good outside of Windows too- it's good anytime you need to work with files neither ASCII nor UTF8. With UTF8, the -C options can get your command-line disposable working quickly. And as a bonus it also detects UTF-16 or 32, BUT the CRLFs in my files still tripped it up, requiring me to suss out these options.

  • Leon Timmermans commented on UTF-16 and Windows CRLF, oh my

    The PERLIO environmental variable may also be able to help you there.

  • redcoder commented on UTF-16 and Windows CRLF, oh my

    This blog post saved my day! I was getting frustrated at my code for massaging UTF-16 XML files on Windows because I noticed extra CR being added for some reason. Changed the file open to :raw:encode(utf16) and it just worked. So easy. Came across the post on reddit. Thanks again!

  • Yary commented on UTF-16 and Windows CRLF, oh my

    yay! Glad it's helping.

Subscribe to feed Responses to Comments from martin

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.