String: Create multi-line string
Tasks: 1.Create a multi-line string 2.Print the string
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.Create a multi-line string 2.Print the string
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.Assign a string to a variable 2.Get the length of the string
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.Assign a string to a variable. 2.Print 5 chars starting from index 6, the output should be "rough".
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.test1 2.Assign a string to a variable. 3.Print index of substring "rough". 4.Check if substring "rough" exists or not.
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.Assign a string to a variable 2.Replace 'Fair' with 'fair' for one occurrence 3.Replace 'Fair' with 'fair' for all occurrences
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.Assign a string to a variable 2.Change the string to Upper case
Bash | Perl | Python |
---|---|---|
|
|
|
In perl Values are considered false if it equals '', (), [], {}, 0, 0L, 0.0, 0j, False, None
Tasks: 1.Define a function to check if the input is an empty string 2.Call the function with different arguments
Bash | Perl | Python |
---|---|---|
|
|
|
Note: Ip perl, chomp() function will remove current value of $/ at the end of a string. $/ defaults to a newline.
Tasks: 1.Define a variable with white spaces in value 2.Remove the whilespaces in the variable 3.output the result
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.Assign a string to a variable. 2.Catenate two strings and print the result.
Bash | Perl | Python |
---|---|---|
|
|
|
Tasks: 1.Define a variable with string value 2.Get and output the array
Bash | Perl | Python |
---|---|---|
|
|
|