They cannot be substituted by perhaps/maybe.
"If nothing else" is used when you add a positive comment about a generally negative situation (=at least): A: This place smells terrible! B: If nothing else, it's pretty cheap.
"If anything" is used when you want to introduce an idea that changes or stresses the previous statement in a small way:
Living together didn't harm our friendship. If anything it strengthened it.