Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^14: let Makefile.PL to do the Readme file for me -- new target? (Powershell)

by LanX (Saint)
on Jan 22, 2021 at 00:45 UTC ( [id://11127251]=note: print w/replies, xml ) Need Help??


in reply to Re^13: let Makefile.PL to do the Readme file for me -- new target? (Powershell)
in thread let Makefile.PL to do the Readme file for me -- new target?

> for example are these objects allowed to have pointers to other objects?

yes, a little demo

PS C:\tmp> ls tst # stringific +ation of list of objects Verzeichnis: C:\tmp Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 22.01.2021 01:23 12 tst PS C:\tmp> (ls tst).GetAccessControl().Owner # get Access + Obj and get owner COM\RolfLanX PS C:\tmp> $x=ls tst # save obj i +n var PS C:\tmp> $x.length 6 PS C:\tmp> cat tst PS C:\tmp> echo "blabla" >tst # change con +tent PS C:\tmp> $x.length # old length 6 PS C:\tmp> (ls tst).length # new length 18

I also already found a caveat

PS C:\tmp> (ls tst*).name # name for each list element tst tst.pl tst.txt tst_flushing.pl tst_flushing.pl~ tst_onclick.html tst_onclick.html~ tst_pde.pl tst_pde.pm tst_pde.pm~ PS C:\tmp> (ls tst*).length # length of list not list elements 10

NB: The "cmdlet" Get-ChiltItem (aka ls) can list very different types of objects, not only filesystem.

PS C:\tmp> ls -Path HKLM:\HARDWARE Hive: HKEY_LOCAL_MACHINE\HARDWARE Name Property ---- -------- ACPI DESCRIPTION DEVICEMAP RESOURCEMAP UEFI PS C:\tmp> cd -Path HKLM:\HARDWARE # cd into registry PS HKLM:\HARDWARE> ls -name # list names ACPI DESCRIPTION DEVICEMAP RESOURCEMAP UEFI PS HKLM:\HARDWARE>

TIMTOWTDI, this is was all done without even piping.

You might wanna consult a tutorial, I only scratched the surface so far. :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^15: let Makefile.PL to do the Readme file for me -- new target? (Powershell)
by bliako (Monsignor) on Jan 22, 2021 at 13:11 UTC

    ok thanks, it's all new to me. And I found a couple of related modules on CPAN. The dir-style for options also appears in Linux (e.g. /proc) don't know which was there first.

      Disclaimer: I'm still far more fluent in bash and linux tools.

      But I'd like to see some of these features used in Perl.

      > ps | where Company -like *LLC | select name,company -last 4 Name Company ---- ------- chrome Google LLC chrome Google LLC PTIM Cisco WebEx LLC ptpluginhost Cisco WebEx LLC

      update

      changed example

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11127251]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-03-29 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found