"Sputnik" help  
Sputnik Help
Guid([<value>])

Description

Converts a value to a Guid. If a Guid in string or binary representation is provided, it returns the corresponding Guid. If no arguments are provided, the function returns a new Guid. If given a null value, it also returns a new Guid.

Parameters

[<value>] Optional. The value to be converted to a Guid.

Return Value

Success: Returns the Guid representation of the input value if the conversion is successful.
Failure: Returns a new Guid if no arguments are provided or if the input value is null.

Remarks

The Guid function is versatile, accepting values in string or binary representation to produce the corresponding Guid. If no arguments are given, it generates a new Guid. If a null value is provided, it also returns a new Guid.

Related

Casting, IsVarGuid

Example

Example of usage:

my $a = (String)Guid();
say $a;
say Guid($a);
// !*!$%")a!GTJd!I&K'#J,8&%IeHcpf`V
// !*!$%")a!GTJd!I&K'#J,8&%IeHcpf`V

Casting:

my $a = @Guid;
my $b = @GuidBin;
say (Guid)$a;
say (Guid)$b;
// PRINTS
// !*!$%")a!GTJd*f9($##Mmf%(DLG!iG-
// !*!$%")a!GTJd*f9($!!X-!e!*!!qG+qY!

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org